corrected an error in the BattleState class
receivedEffect-function added remaining Opponent Ships to ownMap instead of opponentMap
This commit is contained in:
@@ -60,7 +60,7 @@ public void receivedEffect(EffectMessage msg) {
|
|||||||
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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user