from enum import IntEnum


class OpCodes(IntEnum):
    NONE = 0
    HAIL = 1
    ACCEPTED = 2
    DENIED = 3

    EXECUTE_COMMAND = 10
    SEND_PLAYER_STATS = 11
    SPAWN_PLAYER = 12
    SET_NEW_ROOM_SETTINGS = 13
    RESPOND_PLAYER_MESSAGE = 14
    SET_NEW_ROUND_STATE = 15
    SET_PLAYER_WEAPON = 16
    SET_PLAYER_GADGET = 17

    PLAYER_CONNECTED = 50
    PLAYER_DISCONNECTED = 51
    ON_PLAYER_TYPED_MESSAGE = 52
    ON_PLAYER_KILLED_ANOTHER_PLAYER = 53
    ON_PLAYER_JOINING = 54
    SAVE_PLAYER_STATS = 55
    ON_PLAYER_ASKING_TO_CHANGE_ROLE = 56
    ON_PLAYER_CHANGED_ROLE = 57
    ON_PLAYER_JOINED_A_SQUAD = 58
    ON_PLAYER_LEFT_SQUAD = 59
    ON_PLAYER_CHANGED_TEAM = 60
    ON_PLAYER_REQUESTING_TO_SPAWN = 61
    ON_PLAYER_REPORT = 62
    ON_PLAYER_SPAWN = 63
    ON_PLAYER_DIE = 64
    NOTIFY_NEW_MAP_ROTATION = 65
    NOTIFY_NEW_GAME_MODE_ROTATION = 66
    NOTIFY_NEW_ROUND_STATE = 67
    ON_PLAYER_ASKING_TO_CHANGE_TEAM = 68
    GAME_TICK = 69
    ON_PLAYER_GIVEN_UP = 70
    ON_PLAYER_REVIVED_ANOTHER = 71
    ON_SQUAD_POINTS_CHANGED = 72
    NOTIFY_NEW_ROUND_ID = 73
    LOG = 74
    ON_SQUAD_LEADER_CHANGED = 75
    UPDATE_NEW_GAME_DATA = 76
    UPDATE_CONNECTED_PLAYERS = 77
