From 511bfc72f45aa855676c2266f25993d89fce1f75 Mon Sep 17 00:00:00 2001 From: fdai4581 Date: Tue, 7 Feb 2023 21:32:46 +0100 Subject: [PATCH] update --- src/main/java/BattleShip/GridGUI.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/BattleShip/GridGUI.java b/src/main/java/BattleShip/GridGUI.java index d94c26a..158f734 100644 --- a/src/main/java/BattleShip/GridGUI.java +++ b/src/main/java/BattleShip/GridGUI.java @@ -109,7 +109,15 @@ public class GridGUI { gameOver = false; } } + if(gameOver) { + text = "You win! You took " + numOfGuesses + " guesses."; + endGame = true; + } + + clicked = true; } } } -} \ No newline at end of file +} + +