From 54b1d794f84c687e8d2d5613aa2bad9efa7a34d9 Mon Sep 17 00:00:00 2001 From: Leonardo Brandenberger Date: Mon, 29 Nov 2021 17:23:55 +0100 Subject: [PATCH] new Class Parser and corresponding enums created --- src/ch/zhaw/catan/Command.java | 11 +++++++++++ src/ch/zhaw/catan/CommandWords.java | 4 ++++ src/ch/zhaw/catan/Parser.java | 25 +++++++++++++++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 src/ch/zhaw/catan/Command.java create mode 100644 src/ch/zhaw/catan/CommandWords.java create mode 100644 src/ch/zhaw/catan/Parser.java diff --git a/src/ch/zhaw/catan/Command.java b/src/ch/zhaw/catan/Command.java new file mode 100644 index 0000000..013698e --- /dev/null +++ b/src/ch/zhaw/catan/Command.java @@ -0,0 +1,11 @@ +package ch.zhaw.catan; + +public enum Command { + NEXTPLAYER ("next Player"), QUIT("quit"); + + private String CommandWord; + + Command(String commandWord) { + this.CommandWord = commandWord; + } +} diff --git a/src/ch/zhaw/catan/CommandWords.java b/src/ch/zhaw/catan/CommandWords.java new file mode 100644 index 0000000..d67b327 --- /dev/null +++ b/src/ch/zhaw/catan/CommandWords.java @@ -0,0 +1,4 @@ +package ch.zhaw.catan; + +public class CommandWords { +} diff --git a/src/ch/zhaw/catan/Parser.java b/src/ch/zhaw/catan/Parser.java new file mode 100644 index 0000000..15a4cd0 --- /dev/null +++ b/src/ch/zhaw/catan/Parser.java @@ -0,0 +1,25 @@ +package ch.zhaw.catan; +import org.beryx.textio.TextIO; +import org.beryx.textio.TextIoFactory; +import org.beryx.textio.TextTerminal; + +public class Parser { + TextIO textIO = TextIoFactory.getTextIO(); + TextTerminal textTerminal; + + + public Parser() { + textTerminal = textIO.getTextTerminal(); + run(); + } + + public void run() { + boolean running = true; + while (running) { + } + } + + + +} +