diff --git a/src/main/java/BattleShip/BShip.java b/src/main/java/BattleShip/BShip.java index 38f98b5..190ede9 100644 --- a/src/main/java/BattleShip/BShip.java +++ b/src/main/java/BattleShip/BShip.java @@ -133,7 +133,16 @@ public class BShip { if(grid1.getEndGame() || grid2.getEndGame()) { grid1.setEndGame(); - + } else { + + if(grid2.areShipsPlaced()) { + shipsPlaced = true; + synchronized (lock) { + lock.notifyAll(); + } + } else { + textArea.setText(grid2.getText()); + } } } }