Added a game end dialog, that shows the result of the finished game.

This commit is contained in:
LevelX2 2013-08-07 16:50:25 +02:00
parent 19726268ff
commit ae44981cfa
19 changed files with 922 additions and 4 deletions

View file

@ -127,14 +127,17 @@ public class PlayerView implements Serializable {
private boolean showInBattlefield(Permanent permanent, GameState state) {
//show permanents controlled by player or attachments to permanents controlled by player
if (permanent.getAttachedTo() == null)
if (permanent.getAttachedTo() == null) {
return permanent.getControllerId().equals(playerId);
}
else {
Permanent attachedTo = state.getPermanent(permanent.getAttachedTo());
if (attachedTo != null)
if (attachedTo != null) {
return attachedTo.getControllerId().equals(playerId);
else
}
else {
return permanent.getControllerId().equals(playerId);
}
}
}