wörterspiel/Interface.java gelöscht
parent
5f21856c35
commit
d4bd975c45
|
|
@ -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);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue