Create logic for games [big issue, needs to be splitted]
The backend must be able to handle multiple gamestates (connected to a lobby).
The backend must be able to get payload from clients (actions), and handle them accordingly.
The internal lobby-state will supply the backend with:
- Players
- Associated game (the game will supply currentTurn, terrain etc...)
The clients will send the following payloads:
- Movement
- Projectiles fired
- ExitGame
The backend will have to do the following:
- accept payload from players
- Check payload is legal and from correct user
- Calculate projectile-hits and update score
- Alert when its next players turn and send updated gamestate to both players
- Update highscore at the end of a game
See: #36 (closed)