From d4bd975c45c147f6c4e1f8d8c635bad20176fb82 Mon Sep 17 00:00:00 2001 From: Tobias Gladhorn <3019210@stud.hs-mannheim.de> Date: Thu, 9 Jan 2025 09:27:44 +0100 Subject: [PATCH] =?UTF-8?q?w=C3=B6rterspiel/Interface.java=20gel=C3=B6scht?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wörterspiel/Interface.java | 93 -------------------------------------- 1 file changed, 93 deletions(-) delete mode 100644 wörterspiel/Interface.java diff --git a/wörterspiel/Interface.java b/wörterspiel/Interface.java deleted file mode 100644 index 33d4480..0000000 --- a/wörterspiel/Interface.java +++ /dev/null @@ -1,93 +0,0 @@ -import java.util.Scanner; -import java.io.File; -import java.io.FileNotFoundException; - -public class Interface { - - public static void main(String[] arg) throws FileNotFoundException { - - menue(); - - } - - public static void menue() throws FileNotFoundException { - - welcomescreen(); - boolean menue = true; - Scanner scan = new Scanner(System.in); - - do { - - String input = scan.nextLine(); - - if (input.equalsIgnoreCase("Starten")) { - - Format.pad(141); - WortSpiel.spiel(); - menue = false; - Format.pad(141); - - }else if(input.equalsIgnoreCase("Regeln")){ - - regeln(); - welcomescreen(); - - }else if(input.equalsIgnoreCase("Spieler")) { - - Format.pad(141); - WortSpiel.spieleroptionen(); - welcomescreen(); - - }else if(input.equalsIgnoreCase("Ergebnis")) { - - Format.pad(141); - WortSpiel.ergebnis(); - welcomescreen(); - - }else if(input.equalsIgnoreCase("Back")) { - Format.pad(141); - welcomescreen(); - - }else if(input.equalsIgnoreCase("Stop")) { - menue = false; - - }else { - Format.pad(141); - System.out.println(Format.midpadword("Befehl war unzulässig!",140)); - Format.pad(141); - welcomescreen(); - } - - }while(menue); - - scan.close(); - } - - - private static void regeln() throws FileNotFoundException { - - Format.pad(141); - System.out.println(">->->->->->->->Regeln für das Wortketten-Spiel<-<-<-<-<-<-<-<"); - Scanner scan = new Scanner(new File("src/Regeln.txt")); - while(scan.hasNext()) { - System.out.println(Format.padword(scan.nextLine(), 140)); - } - Format.pad(141); - scan.close(); - } - - - private static void welcomescreen() { - Format.pad(141); - System.out.println(">->->->Willkommen beim Wörterspiel<-<-<-<"); - System.out.println(Format.padword("Starten", 40)); - System.out.println(Format.padword("Regeln", 40)); - System.out.println(Format.padword("Spieler", 40)); - System.out.println(Format.padword("Ergebnis", 40)); - System.out.println(Format.padword("Stop", 40)); - System.out.println(Format.padword("Back", 40)); - System.out.println(">>Bitte geben Sie die gewünschte Aktion an<<"); - Format.pad(141); - } - -}