forked from IF-LK-2020/wordle
quit
This commit is contained in:
@@ -10,6 +10,7 @@ public class Game {
|
||||
private String wordle;
|
||||
private String[] words;
|
||||
private int count;
|
||||
private int phase;
|
||||
|
||||
public Game(WordleServer wordleServer, String pClientIP, int pClientPort) {
|
||||
|
||||
@@ -18,10 +19,32 @@ public class Game {
|
||||
this.port = pClientPort;
|
||||
|
||||
user = new User();
|
||||
|
||||
send("+OK Hello there");
|
||||
}
|
||||
|
||||
public void processMessage(String msg) {
|
||||
System.out.println(msg);
|
||||
|
||||
if (msg.equals("quit")) {
|
||||
send("+OK bye");
|
||||
wordleServer.closeConnection(ip, port);
|
||||
}
|
||||
|
||||
switch (phase) {
|
||||
case 0:
|
||||
|
||||
break;
|
||||
case 1:
|
||||
|
||||
break;
|
||||
case 2:
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void send(String msg) {
|
||||
wordleServer.send(ip, port, msg);
|
||||
}
|
||||
|
||||
public String getIp() {
|
||||
|
||||
Reference in New Issue
Block a user