forked from IF-LK-2020/wordle
phase constants
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
public class Game {
|
||||
// Instanzvariablen - ersetzen Sie das folgende Beispiel mit Ihren Variablen
|
||||
|
||||
private static final int LOGIN_PHASE = 0;
|
||||
private static final int GAME_PHASE = 1;
|
||||
private static final int END_PHASE = 2;
|
||||
|
||||
WordleServer wordleServer;
|
||||
User user;
|
||||
static DatabaseConnector databaseConnector;// Datenbankverbindung aufstellen
|
||||
@@ -31,7 +35,6 @@ public class Game {
|
||||
this.port = pClientPort;
|
||||
|
||||
send("+OK Hello there");
|
||||
|
||||
}
|
||||
|
||||
public void processMessage(String msg) {
|
||||
@@ -45,13 +48,13 @@ public class Game {
|
||||
}
|
||||
|
||||
switch (phase) {
|
||||
case 0:
|
||||
case LOGIN_PHASE:
|
||||
loginPhase(msg);
|
||||
break;
|
||||
case 1:
|
||||
case GAME_PHASE:
|
||||
gamePhase(msg);
|
||||
break;
|
||||
case 2:
|
||||
case END_PHASE:
|
||||
endPhase(msg);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user