fireship-io / react-course

React - The Full Course
74 stars 41 forks source link

[Memento game] Bug - quickly double clicking a tile reveals the matching tile #7

Open joshlbaker opened 1 month ago

joshlbaker commented 1 month ago

I found a way to cheat in this game 😄

See video below as this is pretty easy to reproduce.

https://github.com/user-attachments/assets/0b771e0f-78b6-45b0-9767-01cb94142feb

This can be recreated using his demo link.

I noticed this happening as I was following along the tutorial and thought I was going mad. Seems like it could be fixed by either disabling the click event until the animation is over, or restructuring how the duplicate tiles are initialized.

joshlbaker commented 1 month ago

Ahh nice, a fix https://github.com/fireship-io/react-course/pull/6