Currently the server behaves very simple and just creates new players as soon as they connect into the running game.
Ideally the server should have two states:
Lobby
Game running
In lobby mode clients can connect and the game can be configured (Number of players, size of the map, start locations, number of units, ...).
When the game has started, connects shouldn't be possible anymore, only reconnects (maybe protected with a token).
When the game ends, we should be back in lobby mode.
Currently the server behaves very simple and just creates new players as soon as they connect into the running game. Ideally the server should have two states:
In lobby mode clients can connect and the game can be configured (Number of players, size of the map, start locations, number of units, ...). When the game has started, connects shouldn't be possible anymore, only reconnects (maybe protected with a token). When the game ends, we should be back in lobby mode.