From fafd2f370b4cdcdc0188dc50db46340b117ff934 Mon Sep 17 00:00:00 2001 From: fdai4581 Date: Wed, 8 Feb 2023 21:00:44 +0100 Subject: [PATCH] update --- src/main/java/BattleShip/BShip.java | 18 ++++++++++++++++++ target/classes/BattleShip/BShip.class | Bin 3188 -> 3393 bytes 2 files changed, 18 insertions(+) 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 8f74383d6ca31bf641099e15b0ce20ffb1d596c8..c90ea358e2552839303bc77f940bcf0c80f3a19e 100644 GIT binary patch literal 3393 zcmZuzYgAlU75>gVxRcvU7$`K&LrPMpgoF&BHfg3w!;l0AfzUumC#})Ta08Rf%*B~I zfz(H9?Mtn1+ghz!>mzEl8qEw^+W6KQt@=ZM`Om+u>2 z`|SPgz0WyU|M$uj00;0F69EJbge-(nrw~1BpSNRKJ3kXUHg(oXdkS@TXYv{EphB>7 z=i~-Nu)%<7;U-uVPuQN9b;f5ibFqZ{6+&4zeNLfic&(+lfsNz~dm&bw&v1*OF+1;M zP1GYOh8rz3;bw)1H|yvXg=TGLwR~J;TP)lnvKu^S!PCM9ZdGVmWqyKd{RPK1vB}?I ztA%ZNi|kNcQP{M4hh-Idd)r!Xj~48l6Tx-`(~rBzh)uNOc0sS5yLZ+^J?<44W8BB= z4hwHZryrU&vo18v)uDA+*oEB+^>)c~$Fg?X$vJr@LY*?OXKjchPQH}%oSb0NW1$y) z#AM2~3)AD72OWi5?_V9?vb^5u?H1mFJDIbBJ744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