From a470557422c95b490384d96989fe0312b5fb903a Mon Sep 17 00:00:00 2001 From: Oliver Hummel Date: Fri, 10 May 2024 14:54:35 +0200 Subject: [PATCH] Initial Commit --- MyKniffel/.gitignore | 3 ++ MyKniffel/.settings/.gitignore | 1 + .../games/kniffel/domain/Würfel.java | 5 +++ .../games/kniffel/facade/KniffelApi.java | 5 +++ .../informatik/games/kniffel/tui/TuiMain.java | 43 +++++++++++++++++++ README.md | 3 ++ 6 files changed, 60 insertions(+) create mode 100644 MyKniffel/.gitignore create mode 100644 MyKniffel/.settings/.gitignore create mode 100644 MyKniffel/src/de/hs_mannheim/informatik/games/kniffel/domain/Würfel.java create mode 100644 MyKniffel/src/de/hs_mannheim/informatik/games/kniffel/facade/KniffelApi.java create mode 100644 MyKniffel/src/de/hs_mannheim/informatik/games/kniffel/tui/TuiMain.java create mode 100644 README.md 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