Skip to content

Commit

Permalink
Fix newing some references for turn
Browse files Browse the repository at this point in the history
  • Loading branch information
taslimisina committed Mar 3, 2020
1 parent e3f378a commit 420d59f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion src/Client/Model/Map.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ private Map(int rows, int cols) {
}

public static Map createMap(int rows, int cols) {
if (map != null) return map;
map = new Map(rows, cols);
return map;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Client/dto/turn/ClientTurnMessage.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class ClientTurnMessage {
public ClientTurnMessage() { }

private void updateMapUnits(TurnMessage turnMessage){
Map.getMap().getUnits().clear();
Map.getMap().setUnits(new ArrayList<>());
for(Unit unit : turnMessage.getUnits())
Map.getMap().getUnits().add(unit);
}
Expand Down

0 comments on commit 420d59f

Please sign in to comment.