From e708788bcfef2a3d49e29cccf94c38b86b52f580 Mon Sep 17 00:00:00 2001 From: fdai4581 Date: Tue, 7 Feb 2023 21:23:31 +0100 Subject: [PATCH] update --- src/main/java/BattleShip/GridGUI.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/BattleShip/GridGUI.java b/src/main/java/BattleShip/GridGUI.java index 26550b1..cf58c54 100644 --- a/src/main/java/BattleShip/GridGUI.java +++ b/src/main/java/BattleShip/GridGUI.java @@ -74,7 +74,13 @@ public class GridGUI { } public class MyCellListener implements ActionListener { public void actionPerformed(ActionEvent a) { - + if(!clicked) { + BSButton cell = (BSButton) a.getSource(); + Ship s = cell.getCellContents(); + boolean killed = false; + numOfGuesses++; + boolean gameOver = true; + } } } } \ No newline at end of file