DEFAULT_TEAM_NAME_1 = 'Defaulticons'
DEFAULT_TEAM_NAME_2 = 'Standardators'
STALEMATE_CHECK_PERIOD = 1
COLLECTABLE_STAR_LIFETIME = 12
NO_COLLECTABLE_STARS = False        # For debugging.
TICK_PERIOD = 0.05
MAX_PLAYER_NAME_LENGTH = 30

# The time after a zone tag after which there is 50% of a new
# collectable star appearing every STALEMATE_CHECK_PERIOD.
ZONE_TAG_STAR_HALF_LIFE = 60

GAME_STATE_CHECK_PERIOD = 5
RABBIT_CHASING_PERIOD = 60


MAP_TO_SCREEN_SCALE = 1.25

BODY_BLOCK_MAP_SIZE = (1024, 384)
BODY_BLOCK_SCREEN_SIZE = (
    int(BODY_BLOCK_MAP_SIZE[0] * MAP_TO_SCREEN_SCALE + 0.5),
    int(BODY_BLOCK_MAP_SIZE[1] * MAP_TO_SCREEN_SCALE + 0.5),
)
INTERFACE_BLOCK_MAP_SIZE = (512, 384)
INTERFACE_BLOCK_SCREEN_SIZE = (
    int(INTERFACE_BLOCK_MAP_SIZE[0] * MAP_TO_SCREEN_SCALE + 0.5),
    int(INTERFACE_BLOCK_MAP_SIZE[1] * MAP_TO_SCREEN_SCALE + 0.5),
)


# When a client is found to be lagging, this is the number of extra frames of
# delay that's added (on top of the measured lag), to prevent lots of resyncs
# in quick succession.
LAG_BUFFER = 1
LAG_THRESHOLD = 5
INITIAL_ASSUMED_LATENCY = int(0.3 / TICK_PERIOD)


PATH_FINDING_DISCRETISATION_UNIT = 4.5



# deathTypes
SHOT_DEATH = 'S'
TURRET_DEATH = 'T'
GRENADE_DEATH = 'G'
SHOXWAVE_DEATH = 'W'
OFF_MAP_DEATH = 'O'
TROSBALL_DEATH = 'B'
BOMBER_DEATH = 'X'


# ChatMsg kinds
OPEN_CHAT = 'o'
PRIVATE_CHAT = 'p'
TEAM_CHAT = 't'


# CannotBuyUpgradeMsg reasons
NOT_ENOUGH_STARS_REASON = 'N'
HAVE_UPGRADE_REASON = 'A'
PLAYER_DEAD_REASON = 'D'
GAME_NOT_STARTED_REASON = 'P'
ALREADY_TURRET_REASON = 'T'
TOO_CLOSE_TO_EDGE_REASON = 'E'
TOO_CLOSE_TO_ORB_REASON = 'O'
NOT_IN_DARK_ZONE_REASON = 'F'
ALREADY_DISRUPTED_REASON = 'M'
INVALID_UPGRADE_REASON = 'I'
DISABLED_UPGRADE_REASON = 'X'


# CannotJoinMsg reasons
GAME_FULL_REASON = 'F'
UNAUTHORISED_REASON = 'A'
NICK_USED_REASON = 'N'
BAD_NICK_REASON = 'B'
USER_IN_GAME_REASON = 'U'
ALREADY_JOINED_REASON = 'J'


# CannotRespawnMsg reasons
RESYNC_IN_PROGRESS_REASON = 'r'
# GAME_NOT_STARTED_REASON = 'P' (defined above)
ALREADY_ALIVE_REASON = 'A'
BE_PATIENT_REASON = 'T'
ENEMY_ZONE_REASON = 'E'
FROZEN_ZONE_REASON = 'F'
