diff --git a/src/Game.java b/src/Game.java index 70f41e0..573cd34 100644 --- a/src/Game.java +++ b/src/Game.java @@ -23,6 +23,8 @@ public class Game { public void processMessage(String msg) { + msg = msg.toLowerCase().trim(); + if (msg.equals("quit")) { send("+OK bye"); wordleServer.closeConnection(ip, port); @@ -42,15 +44,33 @@ public class Game { } private void loginPhase(String msg) { - + if (msg.startsWith("user")) { + + } else if (msg.startsWith("pass")) { + + } else if (msg.startsWith("wotd")) { + + } else if (msg.startsWith("play")) { + + } } private void gamePhase(String msg) { - + if (msg.startsWith("send")) { + + } else if (msg.startsWith("info")) { + + } else if (msg.startsWith("exit")) { + + } } private void endPhase(String msg) { - + if (msg.startsWith("stat")) { + + } else if (msg.startsWith("play")) { + + } } private void send(String msg) {