From 7ed49bfc037e160417ad04c2a4e009fb8aa20b49 Mon Sep 17 00:00:00 2001 From: Andrin Fassbind Date: Fri, 8 Oct 2021 10:54:41 +0200 Subject: [PATCH] -Method outputDrawText implemented -Method outputGameOverText Consoletext changed --- src/Language.java | 12 ++++++++++-- test/LanguageTest.java | 7 +++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/Language.java b/src/Language.java index ce825a4..926fbda 100644 --- a/src/Language.java +++ b/src/Language.java @@ -60,10 +60,18 @@ public class Language { /** * Methode: outputGameOverText - * Diese Methode gibt den Text aus, falls es keinen Gewinner gibt und informiert den Nutzer über das Ende des Spiels. + * Diese Methode gibt den Text aus, wenn das Spiel zu ende ist. */ public void outputGameOverText(){ - System.out.println(checkLanguage("Das Spiel ist zu ende! Es ist untentschieden","The Game has finished! We have no winner","Trò chơi kết thúc rồi! Chúng tôi không có người chiến thắng")); + System.out.println(checkLanguage("Das Spiel ist zu ende!","The Game has finished!","Trò chơi kết thúc rồi!")); + } + + /** + * Methode: outputDrawText + * Diese Methode gibt den Text aus, falls es Unentschieden ist. + */ + public void outputDrawText(){ + System.out.println(checkLanguage("Wir haben keinen Gewinner. Es ist unentschieden","We have no Winner. It's a draw","Chúng tôi không có người chiến thắng.")); } /** diff --git a/test/LanguageTest.java b/test/LanguageTest.java index e030838..64e5ece 100644 --- a/test/LanguageTest.java +++ b/test/LanguageTest.java @@ -30,6 +30,13 @@ class LanguageTest { viet.outputGameOverText(); } + @Test + void outputDrawText(){ + deutsch.outputDrawText(); + english.outputDrawText(); + viet.outputDrawText(); + } + @Test void outputNextPlayerText() { deutsch.outputNextPlayerText(1);