State diagram - Miol-Mor/battle-game GitHub Wiki
Game start
Start socket
Start click handlers
- Prepare
Wait for 'field' command
Draw field
- Wait
Wait for 'turn' command
- Move_from
Wait for click
Select hex to move from
- Move_to
Wait for click
Select hex to move to
Send move to the server
Wait for 'change' command
Redraw field
- Attack
Wait for click
Select hex to attack
Send attack to the server
Wait for 'change' command
Redraw field
- Wait
Loop
Wait for 'change' command
Redraw field
Wait for 'turn' or 'end' command
- End