reviced() did not update the OpponentPlayer ships list corretly

This commit is contained in:
Johannes Schmelz 2024-10-05 23:46:08 +02:00
parent 62421e87cc
commit 1c99117ca0

View File

@ -60,7 +60,7 @@ class BattleState extends ClientState {
if (destroyedOpponentShip(msg)) if (destroyedOpponentShip(msg))
logic.getOpponentMap().add(msg.getDestroyedShip()); logic.getOpponentMap().add(msg.getDestroyedShip());
if (msg.isGameOver()) { if (msg.isGameOver()) {
msg.getRemainingOpponentShips().forEach(logic.getOwnMap()::add); msg.getRemainingOpponentShips().forEach(logic.getOpponentMap()::add);
logic.setState(new GameOverState(logic)); logic.setState(new GameOverState(logic));
} }
} }