From 6c36073e8793efcd5625c9746b5ea0b1417a58e7 Mon Sep 17 00:00:00 2001 From: KahootChampion Date: Mon, 18 Feb 2019 22:50:24 -0700 Subject: [PATCH] Added GameOver() Method to Player class, btw System.out.flush just straight up Thanos's the terminal at the time (clears it). --- src/Player.java | 5 +++++ src/ShipWarfare.java | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Player.java b/src/Player.java index 26e1417..c09d4e3 100644 --- a/src/Player.java +++ b/src/Player.java @@ -108,4 +108,9 @@ public class Player { this.guns = guns; } } + + public void gameOver() { + System.out.flush(); + System.out.println("Game over"); + } } diff --git a/src/ShipWarfare.java b/src/ShipWarfare.java index c5c2235..428ea84 100644 --- a/src/ShipWarfare.java +++ b/src/ShipWarfare.java @@ -49,10 +49,6 @@ public class ShipWarfare extends Player { TimeUnit.SECONDS.sleep(1); } - public void gameOver() { - System.out.flush(); - System.out.println("Game over"); - } public int numOfShips() {