aboutsummaryrefslogtreecommitdiff
path: root/.gitignore
diff options
context:
space:
mode:
authorThomas Voss <thomasvoss@live.com> 2022-01-09 23:47:35 +0100
committerThomas Voss <thomasvoss@live.com> 2022-01-09 23:47:35 +0100
commit9757707f06fbec379e6d8e940cc9d7919480c7c7 (patch)
treed8fdb2e6c7491c4e36177c206a3f348fd8c63672 /.gitignore
parentfc39c5256e9366d417a64ec4a3554eab5c84c64b (diff)
Add a game queue and handle disconnects
The server now has an array of games that currently exist. When a client attempts to join a game, the server will check if another player is already waiting for an opponent and if so, matches the two players against each other. If all the games are full the server will create a new game and the player will need to wait for an opponent. The server also has handling for clients that disconnect. When that event occurs, the remaining client is sent a message informing them that their opponent disconnected, and the game is deleted. None of the statistics are updated as it wouldn't make sense to count a statistic such as `minimumMoves' if the opponent disconnected only a few moves in.
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions