forked from IF-LK-2020/wordle
State 1 weiter implementiert
This commit is contained in:
@@ -56,9 +56,18 @@ public class WordleServer extends Server {
|
|||||||
} else {
|
} else {
|
||||||
send(pClientIP,pClientPort,"-ERR Command not valid in this state");
|
send(pClientIP,pClientPort,"-ERR Command not valid in this state");
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(u.getState()){
|
switch(u.getState()){
|
||||||
case 1:
|
case 1:
|
||||||
//Anmeldephase
|
//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;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
//Spielphase
|
//Spielphase
|
||||||
|
|||||||
Reference in New Issue
Block a user