From 5c86d218cbc2cb6aaaa50b98c8e7d88d55ac6800 Mon Sep 17 00:00:00 2001 From: Andrin Fassbind Date: Sat, 9 Oct 2021 15:50:38 +0200 Subject: [PATCH] added language.outputGameOverText() at line 53 Game.java changed Method switchPlayer() and checkForTie() to private at line 71 and line 138 Game.java --- src/Game.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Game.java b/src/Game.java index f61e715..e19e7f1 100644 --- a/src/Game.java +++ b/src/Game.java @@ -50,6 +50,7 @@ public class Game { if(checkForWin()) { language.outputWinnerText(playerPlaying); + language.outputGameOverText(); gameFinished = true; } else if (checkForTie()) { language.outputTieText(); @@ -67,7 +68,7 @@ public class Game { * Methode placeField aufgerufen. * Der Spieler wird automatisch gewechselt. */ - public void switchPlayer() { + private void switchPlayer() { if (playerPlaying == 1) { playerPlaying = player2; } else { @@ -134,7 +135,7 @@ public class Game { (gamefield.getField(field1) >= 1)); } - public boolean checkForTie() { + private boolean checkForTie() { return gamefield.countSetFields() == 9; }