removed empty lines
parent
dae2aff1d1
commit
9d4b349f9d
|
@ -14,39 +14,32 @@ public class ViewerInfo {
|
||||||
private List<StackViewerInfo> stack;
|
private List<StackViewerInfo> stack;
|
||||||
|
|
||||||
public synchronized PlayerViewerInfo getPlayerInfo(final boolean opponent) {
|
public synchronized PlayerViewerInfo getPlayerInfo(final boolean opponent) {
|
||||||
|
|
||||||
return opponent?opponentInfo:playerInfo;
|
return opponent?opponentInfo:playerInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized PlayerViewerInfo getAttackingPlayerInfo() {
|
public synchronized PlayerViewerInfo getAttackingPlayerInfo() {
|
||||||
|
|
||||||
return playerInfo.turn?playerInfo:opponentInfo;
|
return playerInfo.turn?playerInfo:opponentInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized PlayerViewerInfo getDefendingPlayerInfo() {
|
public synchronized PlayerViewerInfo getDefendingPlayerInfo() {
|
||||||
|
|
||||||
return playerInfo.turn?opponentInfo:playerInfo;
|
return playerInfo.turn?opponentInfo:playerInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized boolean isVisiblePlayer(final MagicPlayer player) {
|
public synchronized boolean isVisiblePlayer(final MagicPlayer player) {
|
||||||
|
|
||||||
return playerInfo.player==player;
|
return playerInfo.player==player;
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized List<StackViewerInfo> getStack() {
|
public synchronized List<StackViewerInfo> getStack() {
|
||||||
|
|
||||||
return stack;
|
return stack;
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized void update(final MagicGame game) {
|
public synchronized void update(final MagicGame game) {
|
||||||
|
|
||||||
final MagicPlayer player=game.getVisiblePlayer();
|
final MagicPlayer player=game.getVisiblePlayer();
|
||||||
playerInfo=new PlayerViewerInfo(game,player);
|
playerInfo=new PlayerViewerInfo(game,player);
|
||||||
opponentInfo=new PlayerViewerInfo(game,game.getOpponent(player));
|
opponentInfo=new PlayerViewerInfo(game,game.getOpponent(player));
|
||||||
|
|
||||||
stack=new ArrayList<StackViewerInfo>();
|
stack=new ArrayList<StackViewerInfo>();
|
||||||
for (final MagicItemOnStack itemOnStack : game.getStack()) {
|
for (final MagicItemOnStack itemOnStack : game.getStack()) {
|
||||||
|
|
||||||
stack.add(new StackViewerInfo(game,itemOnStack));
|
stack.add(new StackViewerInfo(game,itemOnStack));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue