added name validation

This commit is contained in:
2022-01-13 16:04:35 +01:00
parent 7bc9aff799
commit 6914e6fee7
8 changed files with 35 additions and 11 deletions

View File

@@ -12,10 +12,13 @@ public final class NackMessage extends ServerMessage implements Response {
public static final int UNEXPECTED_MESSAGE = 101;
public static final int ILLEGAL_ARGUMENT = 200;
public static final int NAME_TAKEN = 201;
public static final int NOT_FOUND = 210;
public static final int SESSION_NOT_FOUND = 211;
public static final int PLAYER_NOT_FOUND = 212;
public static final int PLAYER_NAME_TAKEN = 220;
public static final int PLAYER_NAME_NOT_ALLOWED = 221;
public static final int SESSION_NAME_TAKEN = 230;
public static final int SESSION_NAME_NOT_ALLOWED = 231;
public static final int ILLEGAL_STATE = 300;
public static final int GAME_ALREADY_STARTED = 301;