commit a470557422c95b490384d96989fe0312b5fb903a Author: Oliver Hummel Date: Fri May 10 14:54:35 2024 +0200 Initial Commit diff --git a/MyKniffel/.gitignore b/MyKniffel/.gitignore new file mode 100644 index 0000000..3eaf567 --- /dev/null +++ b/MyKniffel/.gitignore @@ -0,0 +1,3 @@ +/bin/ +/.classpath +/.project diff --git a/MyKniffel/.settings/.gitignore b/MyKniffel/.settings/.gitignore new file mode 100644 index 0000000..b012ade --- /dev/null +++ b/MyKniffel/.settings/.gitignore @@ -0,0 +1 @@ +/org.eclipse.core.resources.prefs diff --git a/MyKniffel/src/de/hs_mannheim/informatik/games/kniffel/domain/Würfel.java b/MyKniffel/src/de/hs_mannheim/informatik/games/kniffel/domain/Würfel.java new file mode 100644 index 0000000..770b38d --- /dev/null +++ b/MyKniffel/src/de/hs_mannheim/informatik/games/kniffel/domain/Würfel.java @@ -0,0 +1,5 @@ +package de.hs_mannheim.informatik.games.kniffel.domain; + +public class Würfel { + +} diff --git a/MyKniffel/src/de/hs_mannheim/informatik/games/kniffel/facade/KniffelApi.java b/MyKniffel/src/de/hs_mannheim/informatik/games/kniffel/facade/KniffelApi.java new file mode 100644 index 0000000..742273b --- /dev/null +++ b/MyKniffel/src/de/hs_mannheim/informatik/games/kniffel/facade/KniffelApi.java @@ -0,0 +1,5 @@ +package de.hs_mannheim.informatik.games.kniffel.facade; + +public class KniffelApi { + +} diff --git a/MyKniffel/src/de/hs_mannheim/informatik/games/kniffel/tui/TuiMain.java b/MyKniffel/src/de/hs_mannheim/informatik/games/kniffel/tui/TuiMain.java new file mode 100644 index 0000000..be9800f --- /dev/null +++ b/MyKniffel/src/de/hs_mannheim/informatik/games/kniffel/tui/TuiMain.java @@ -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!"); + + } + +} diff --git a/README.md b/README.md new file mode 100644 index 0000000..93eb907 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# MyKniffel + +Lösungsvorschlag Kniffel \ No newline at end of file