From 6122855213c7c0561c91750350db2993d9c11a29 Mon Sep 17 00:00:00 2001 From: fdai4581 Date: Wed, 8 Feb 2023 21:01:23 +0100 Subject: [PATCH] refactoring: --- src/main/java/BattleShip/BShip.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/BattleShip/BShip.java b/src/main/java/BattleShip/BShip.java index 91cf154..b7fe9dd 100644 --- a/src/main/java/BattleShip/BShip.java +++ b/src/main/java/BattleShip/BShip.java @@ -169,7 +169,7 @@ public class BShip { public class ShipsPlacedReader implements Runnable { public void run() { - while (grid1 == null && grid2 == null) { + while (grid1 != null && grid2 != null) { while (!shipsPlaced) { synchronized (lock) { try {