osso73 / classic_games

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

In 2048, control if no tilesmove #16

Closed osso73 closed 3 years ago

osso73 commented 3 years ago

Ideal behaviour: If no tiles have moved, it should not be counted as a move, and no new tile should appear. The player has to move to a different direction, so at least one tile is moving.

Right now, this is not checked. Even if no tiles move, a new tile appears, as if the move was made.

osso73 commented 3 years ago

Done, added a variable to check if a tile was moved. If no tile was moved, there is no new tile added at the end of the move. Also changed the sound of move to be triggered by the tile move, rather than at te beginning, so in case nothing moves there is no sound.