Can't decide if you should go to the gym? Play Rock Paper Scissors against a computer. Best out of 5, wins. You win - you go to the gym! You lose - you should still go to the gym, but we'll give you a free pass since you lost to a computer. Play on desktop or mobile.
Rock, paper, scissors initially began as a console only game. Next, I implemented a UI version. I developed it for desktop utilizing event listeners for click events. Eventually, I decided to make it mobile friendly.
As I started planning out how I would add in event listeners for touch events, I felt smelly code approaching. Having separate event listeners for click events and touch events felt unnecessary.
After a quick search, this is when I learned about pointer events! Pointer events are all encompassing. This allowed for easier maintainability and readability. I was absolutely ecstatic! How perfect and efficient! This was definitely my favorite learning experience of this project.!
This project was made as part of my journey through The Odin Project.
The icons used were from iconspng.