phase constants

This commit is contained in:
Asecave 2022-03-07 15:50:37 +01:00
parent 86d449cba2
commit e203a8747c
1 changed files with 8 additions and 5 deletions

View File

@ -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;
}