You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Game.next_turn (advances the turn)
Game.next_phase (advances the phase)
Game.move (moves a unit, checking legality in the process)
Game.place (places a unit in a given spot on the board without checking legality, called by move and deploy)
Game.take (removes a unit from play)
Game.deploy (put a new unit into play, checking legality in the process)
The text was updated successfully, but these errors were encountered:
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:
The text was updated successfully, but these errors were encountered: