This is an application that allows a user play against a computer. It is a game of Rock, Paper, Scissors. The user will select the type of game they would like to play - a classic or difficult game. Then in this version of rock, paper, scissors, the user will be able to select between Shark, Crab, Octopus and the more difficult game adds 2 more fun fighters into the mix of turtle, mermaid. The user selects one and the computer takes a turn randomly selecting a fighter and they face off. Then a result is shown and the game is reset.
-
Start off the game by making your selection (either the classic or difficult game). The rules of the game are displayed on the main screen on what beats what. Shown below is how to play a Classic version of this application.
-
This is how you play the difficult version of the application.
-
Press the change game button to be brought back to the main screen.
In this application, there are 2 JavaScript files that hold our player and game classes. These 2 files are storing our data model for the game. We also have our HTML file that holds the basic structure for our application and our CSS file that holds all our additional styling for the application. And finally is our main javascript file that is where all the files are pulled together and where the DOM is manipulated.
This was the first solo project that I started from a blank page and ended with a complete playable application. I struggled the most on my JavaScript functions starting from scratch and I had to pseudocode a lot and break the game down into smaller and smaller pieces. I discovered the more I did that the more code I could create. I found that local storage for me was a sticking point. I was able to save the wins to storage but I was not able to retrieve them for hours. In the end, I found I was just not returning my function and it was required. So my main reflection is that every challenge becomes a win when you keep working at it.
in your terminal run:
git clone [email protected]:Fordo29/rock-paper-scissors.git
cd rock-paper-scissors
open index.html
Repository Contributors :
Code Review:
Boilerplate Code Credits :
CSS
HTML
JavaScript