From 806c00c94a2ceb8677103cae55a913e0598cf5c2 Mon Sep 17 00:00:00 2001 From: Johannes Schmelz Date: Sun, 6 Oct 2024 00:37:20 +0200 Subject: [PATCH] server now shuts down with invalid ship placement --- .../src/main/java/pp/battleship/game/server/ServerGameLogic.java | 1 + 1 file changed, 1 insertion(+) diff --git a/Projekte/battleship/model/src/main/java/pp/battleship/game/server/ServerGameLogic.java b/Projekte/battleship/model/src/main/java/pp/battleship/game/server/ServerGameLogic.java index 8959d04..b2c6dfc 100644 --- a/Projekte/battleship/model/src/main/java/pp/battleship/game/server/ServerGameLogic.java +++ b/Projekte/battleship/model/src/main/java/pp/battleship/game/server/ServerGameLogic.java @@ -150,6 +150,7 @@ public class ServerGameLogic implements ClientInterpreter { if (!validateShips(ships)) { LOGGER.log(Level.ERROR, "Invalid ship placement by player {0}", from); + send(cp, null ); return; }