adjusted LobbyState in the client to use the correct Data
This commit is contained in:
@@ -78,9 +78,8 @@ public void received(ServerStartGameMessage msg){
|
||||
logic.getGame().setBoard(msg.getBoard());
|
||||
logic.addNotification(new GameNotification(logic.getGame().getPlayerById(logic.getOwnPlayerId()).getColor()));
|
||||
for (Map.Entry<Integer, Player> entry : logic.getGame().getPlayers().entrySet()) {
|
||||
entry.getValue().initialize();
|
||||
List<UUID> pieces = new ArrayList<>();
|
||||
for(Piece piece : entry.getValue().getPieces()){
|
||||
for (Piece piece : logic.getGame().getBoard().getPlayerData().get(entry.getValue().getColor()).getPieces()) {
|
||||
pieces.add(piece.getUuid());
|
||||
}
|
||||
logic.addNotification(new PlayerInGameNotification(entry.getValue().getColor(), pieces, entry.getValue().getName()));
|
||||
|
||||
@@ -36,8 +36,7 @@ protected void handlePowerCard(PlayCardMessage msg){
|
||||
logic.getGame().getBoard().getInfield()[logic.getGame().getBoard().getInfieldIndexOfPiece(enemyPiece)].setOccupant(ownPiece);
|
||||
logic.getGame().getBoard().getInfield()[ownIndex].setOccupant(enemyPiece);
|
||||
}
|
||||
logic.getGame().getPlayerByColor(logic.getGame().getActiveColor()).removeHandCard(msg.getCard());
|
||||
logic.getGame().getDiscardPile().add(msg.getCard());
|
||||
logic.getGame().getDiscardPile().add(logic.getGame().getPlayerByColor(logic.getGame().getActiveColor()).removeHandCard(msg.getCard()));
|
||||
}
|
||||
|
||||
protected void throwPiece(Piece piece){
|
||||
|
||||
Reference in New Issue
Block a user