Describe the bug
At the moment when a new word is entered, it is put in the queue with automatic "visiting" and dequeueing. The "visiting" step is async, and implies possibility of a ~1.5s delay before the attempt to dequeue. Now, if the game is restarted right after the word had been scheduled for "visiting", respective timers and requests will be triggered anyway, and hence when that step is over, an attempt to dequeue will happen even though the new round had already begun (and strictly speaking there should've been a completely new queue object if my hands & head would've been in the right place).
To Reproduce
Steps to reproduce the behavior:
Go to the rules.html page and enable the dev tools
Start a new round
Enter some valid word composable from the given set of letters
Before that word is processed, restart the game by pushing the button near the timer
Expected behavior
No new messages in the console
Observed behavior
A message complaining about an attempt to dequeue empty queue
Additional comments
I'm sure more issues could be caused by this... peculiar... design :)
Describe the bug At the moment when a new word is entered, it is put in the queue with automatic "visiting" and dequeueing. The "visiting" step is async, and implies possibility of a ~1.5s delay before the attempt to dequeue. Now, if the game is restarted right after the word had been scheduled for "visiting", respective timers and requests will be triggered anyway, and hence when that step is over, an attempt to dequeue will happen even though the new round had already begun (and strictly speaking there should've been a completely new queue object if my hands & head would've been in the right place).
To Reproduce Steps to reproduce the behavior:
Expected behavior No new messages in the console
Observed behavior A message complaining about an attempt to dequeue empty queue
Additional comments I'm sure more issues could be caused by this... peculiar... design :)