diff --git a/src/main/java/BattleShip/BShip.java b/src/main/java/BattleShip/BShip.java index df2e30f..38f98b5 100644 --- a/src/main/java/BattleShip/BShip.java +++ b/src/main/java/BattleShip/BShip.java @@ -6,7 +6,7 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; public class BShip { - + Object lock = new Object(); public GridGUI grid1; JPanel thePanel = new JPanel(); JPanel textPanel = new JPanel(); @@ -126,5 +126,16 @@ public class BShip { startGame(); } } + public class IncomingGuessReader implements Runnable { + + public void run() { + while(grid1 != null && grid2 != null) { + + if(grid1.getEndGame() || grid2.getEndGame()) { + grid1.setEndGame(); + } + } + } + } }