42_ft_transcendence/games/config.py
starnakin 7cf13640a1 game: core: change player to player.isconnected
befort: if a player is disconnected he doesn't have an object
after: he have un object with a socket == None
2024-01-19 15:38:04 +01:00

20 lines
443 B
Python

PADDLE_SPEED_PER_SECOND_MAX = 0.6
PADDLE_SPEED_PER_SECOND_TOLERANCE = 1.01
PADDLE_RATIO = 0.3
PADDLE_POSITION_MIN: float = PADDLE_RATIO / 2
PADDLE_POSITION_MAX: float = 1 - PADDLE_POSITION_MIN
MAP_SIZE_X = 700
MAP_SIZE_Y = 700
MAP_CENTER_X = MAP_SIZE_X / 2
MAP_CENTER_Y = MAP_SIZE_Y / 2
WALL_RATIO = 1
BALL_SPEED_INC = 1
BALL_SPEED_START = 1
BALL_SIZE = 4
BALL_SPAWN_POS_X = MAP_SIZE_X / 2
BALL_SPAWN_POS_Y = MAP_SIZE_Y / 2
SERVER_TPS = 20