forked from IF-LK-2020/wordle
State 1 weiter implementiert
This commit is contained in:
parent
c4bf054de6
commit
0d06ff6771
|
@ -56,9 +56,18 @@ public class WordleServer extends Server {
|
|||
} else {
|
||||
send(pClientIP,pClientPort,"-ERR Command not valid in this state");
|
||||
}
|
||||
|
||||
switch(u.getState()){
|
||||
case 1:
|
||||
//Anmeldephase
|
||||
String m = pMessage.substring(0,3);
|
||||
if(m.equalsIgnoreCase("USER")){
|
||||
m = pMessage.substring(6,pMessage.length()-1);
|
||||
u.setUsername(m);
|
||||
} else if(m.equalsIgnoreCase("PASS")){
|
||||
m = pMessage.substring(6,pMessage.length()-1);
|
||||
u.setPassword(m);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
//Spielphase
|
||||
|
|
Loading…
Reference in New Issue