osso73 / classic_games

A series of classic games in Kivy
MIT License
3 stars 1 forks source link

In 2048, issue when moving too fast #13

Closed osso73 closed 3 years ago

osso73 commented 3 years ago

If starting the swipe move very fast, before the previous move is finished, there is an unexpected behaviour with tiles: new tiles appear with no value, and tiles are mixed up.

osso73 commented 3 years ago

Possible solution: add variable that is set to True during the move, and False at the end of the move. The new move will not start until this is False.

osso73 commented 3 years ago

Done, added a _moving variable that is true during the move (become false at the end of move). If a new move starts when still true, the new move is rescheduled 0.01s later.