diff --git a/src/main/java/BattleShip/BShip.java b/src/main/java/BattleShip/BShip.java index fa0b876..91cf154 100644 --- a/src/main/java/BattleShip/BShip.java +++ b/src/main/java/BattleShip/BShip.java @@ -166,4 +166,22 @@ public class BShip { } } } + public class ShipsPlacedReader implements Runnable { + + public void run() { + while (grid1 == null && grid2 == null) { + while (!shipsPlaced) { + synchronized (lock) { + try { + lock.wait(); + } catch (InterruptedException e) { + } + } + } + grid1.enableCells(); + auto.setEnabled(false); + break; + } + } + } } diff --git a/target/classes/BattleShip/BShip.class b/target/classes/BattleShip/BShip.class index 8f74383..c90ea35 100644 Binary files a/target/classes/BattleShip/BShip.class and b/target/classes/BattleShip/BShip.class differ