Added GameOver() Method to Player class, btw System.out.flush just straight up Thanos's the terminal at the time (clears it).
This commit is contained in:
@@ -108,4 +108,9 @@ public class Player {
|
|||||||
this.guns = guns;
|
this.guns = guns;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void gameOver() {
|
||||||
|
System.out.flush();
|
||||||
|
System.out.println("Game over");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,10 +49,6 @@ public class ShipWarfare extends Player {
|
|||||||
TimeUnit.SECONDS.sleep(1);
|
TimeUnit.SECONDS.sleep(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void gameOver() {
|
|
||||||
System.out.flush();
|
|
||||||
System.out.println("Game over");
|
|
||||||
}
|
|
||||||
|
|
||||||
public int numOfShips() {
|
public int numOfShips() {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user