Merge branch 'androidmultiaiplayers' into 'master'

3/4 player matches on Android

See merge request core-developers/forge!295
This commit is contained in:
Michael Kamensky
2018-03-21 18:20:22 +00:00
9 changed files with 154 additions and 89 deletions

View File

@@ -238,7 +238,12 @@ public abstract class AbstractGuiGame implements IGuiGame, IMayViewCards {
// Don't immediately close, wait for win/lose screen
return false;
} else {
return true;
for(PlayerView player: getLocalPlayers()){
if(!player.isAI()){
getGameController(player).nextGameDecision(NextGameDecision.QUIT);
}
}
return false;
}
}
else if (spectator == null) {
@@ -421,7 +426,7 @@ public abstract class AbstractGuiGame implements IGuiGame, IMayViewCards {
* @return null if choices is missing, empty, or if the users' choices are
* empty; otherwise, returns the first item in the List returned by
* getChoices.
* @see #getChoices(String, int, int, Object...)
* @see #getChoices(String, int, int, List)
*/
@Override
public <T> T oneOrNone(final String message, final List<T> choices) {

View File

@@ -177,7 +177,7 @@ public abstract class GameLobby implements IHasGameType {
slot.setIsArchenemy(true);
lastArchenemy = 0;
}
updateView(false);
updateView(true);
}
private String randomName() {
final List<String> names = Lists.newArrayListWithCapacity(MAX_PLAYERS);