Initial Commit

refactoringFassade
Oliver Hummel 2024-05-10 14:54:35 +02:00 committed by hummel
commit a470557422
6 changed files with 60 additions and 0 deletions

3
MyKniffel/.gitignore vendored 100644
View File

@ -0,0 +1,3 @@
/bin/
/.classpath
/.project

1
MyKniffel/.settings/.gitignore vendored 100644
View File

@ -0,0 +1 @@
/org.eclipse.core.resources.prefs

View File

@ -0,0 +1,5 @@
package de.hs_mannheim.informatik.games.kniffel.domain;
public class Würfel {
}

View File

@ -0,0 +1,5 @@
package de.hs_mannheim.informatik.games.kniffel.facade;
public class KniffelApi {
}

View File

@ -0,0 +1,43 @@
package de.hs_mannheim.informatik.games.kniffel.tui;
import java.util.Scanner;
import de.hs_mannheim.informatik.games.kniffel.facade.KniffelApi;
public class TuiMain {
private KniffelApi api;
private Scanner kb;
public static void main(String[] args) {
System.out.println("Willkommen beim Star-Wars-Kniffel!");
new TuiMain().hauptmenue();
}
public TuiMain() {
api = new KniffelApi();
kb = new Scanner(System.in);
}
public void hauptmenue() {
mainLoop:
do {
System.out.println();
System.out.println("Auswahlmöglichkeiten:");
System.out.println("9 -> Spiel beenden.");
System.out.println();
System.out.print("Eingabe > ");
switch (kb.nextInt()) {
case 9 -> {break mainLoop;}
default -> System.out.println("Eingabe nicht erkannt, bitte wiederholen.");
}
} while(true);
System.out.println("Auf Wiedersehen!");
}
}

3
README.md 100644
View File

@ -0,0 +1,3 @@
# MyKniffel
Lösungsvorschlag Kniffel