From 2312ee54d4bdf1cbef74fb52f9213b2b99681d6a Mon Sep 17 00:00:00 2001 From: fdai4581 Date: Tue, 7 Feb 2023 21:30:35 +0100 Subject: [PATCH] update --- src/main/java/BattleShip/GridGUI.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/BattleShip/GridGUI.java b/src/main/java/BattleShip/GridGUI.java index b1b4a38..d94c26a 100644 --- a/src/main/java/BattleShip/GridGUI.java +++ b/src/main/java/BattleShip/GridGUI.java @@ -104,7 +104,11 @@ public class GridGUI { cell.setBackground(Color.red); } } - + for(Ship sh : allShips) { + if(!sh.isKilled()) { + gameOver = false; + } + } } } }