From 1c99117ca04d0be5ab40026472dca073b31bb37f Mon Sep 17 00:00:00 2001 From: Johannes Schmelz Date: Sat, 5 Oct 2024 23:46:08 +0200 Subject: [PATCH] reviced() did not update the OpponentPlayer ships list corretly --- .../src/main/java/pp/battleship/game/client/BattleState.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projekte/battleship/model/src/main/java/pp/battleship/game/client/BattleState.java b/Projekte/battleship/model/src/main/java/pp/battleship/game/client/BattleState.java index fa8d731..99df8d0 100644 --- a/Projekte/battleship/model/src/main/java/pp/battleship/game/client/BattleState.java +++ b/Projekte/battleship/model/src/main/java/pp/battleship/game/client/BattleState.java @@ -60,7 +60,7 @@ class BattleState extends ClientState { if (destroyedOpponentShip(msg)) logic.getOpponentMap().add(msg.getDestroyedShip()); if (msg.isGameOver()) { - msg.getRemainingOpponentShips().forEach(logic.getOwnMap()::add); + msg.getRemainingOpponentShips().forEach(logic.getOpponentMap()::add); logic.setState(new GameOverState(logic)); } }