Open nlupugla opened 9 years ago
After some investigation, it seems that this bug is likely an effect of server lag. If the user clicks on a piece while the server is computing a function that would change the state of the game, that function may finish while the legal moves are painted, in which case the front end will update and the interface will reset to the unpainted state.
the question then becomes: whence comes the lag? if it's client-side, there's probably something stupid I'm doing that I can stop doing, which should be easy to fix; but if it's server-side things get a bit messier, since we're running Flask through gunicorn behind nginx so there's a lot of layers for weirdness to hide in there
It seems like sometimes simply clicking on a unit will change the game's state, causing the tiles that become painted to indicate legal moves to unpaint, also requiring the user to click on the unit again. If this happens with enough frequency, it becomes very difficult to move units at all.
Here is a list of functions that change the game's state in no particular order: