@ -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;