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
By holding down the WASD keys, as one does to cruise around at _high speeds_💨, you might notice "ConcurrentModificationException" being generated into the stderr in the console. Turns out the reason for this is engine.executeTurn is actually asynchronous, and at least on my machine we might get keyboard events faster than we can actually process them.
I've tweaked the code as follows to ensure that we don't process a keyboard event if the previous turn is still executing.
By holding down the WASD keys, as one does to cruise around at _high speeds_💨, you might notice "ConcurrentModificationException" being generated into the stderr in the console. Turns out the reason for this is
engine.executeTurn
is actually asynchronous, and at least on my machine we might get keyboard events faster than we can actually process them.I've tweaked the code as follows to ensure that we don't process a keyboard event if the previous turn is still executing.
(Context: just finished tutorial 8)
The text was updated successfully, but these errors were encountered: