Skip to content

janetthieu/rock-paper-scissors

Repository files navigation

Rock Paper Scissors

Rock Paper Scissors on Desktop

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.

The Making of Rock, Paper, Scissors

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.

Most Memorable Challenge

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.

Solution

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.!

Acknowledgments

This project was made as part of my journey through The Odin Project.

The icons used were from iconspng.