Mod 1 + Rock, Paper, Scissors
The aim of this project was to create a fully functioning and playable Rock, Paper, Scissors game.
Players can choose "Classic" or "Difficult" mode.
Players play against a Computer. After playing at least one game in a Mode, players can change game modes.
The player's and computer's scores are saved and are displayed on the left and right sides respectively.
- JavaScript
- HTML
- CSS
The application consists of a single HTML page and three JavaScript files.
- player.js contains a Player class
- Player methods include:
- constructor
- saveWinsToStorage
- retrieveWinsFromStorage
- takeTurn
- game.js contains a Game class
- Player methods include:
- constructor
- trackGameData
- checkForWinConditions
- detectDraw
- resetBoard
- main.js contains DOM-related JavaScript
- Play the app here. OR
- Open the index.html in your brower to run and play the game.
- Created a working CSS "casino" theme.
- Refactoring the code to remove any DOM manipulation from classes
- Fixing 2 issues on time:
- Debugged win counter
- Fixing issue of timer not resetting when first result was a Draw
- Challenges: It was difficult to follow the suggested iterations and to create the classes first.
- Improvements: Next time, I will work on creating the classes first then work on the main JS file.
- Bugs: None
- Future Iterations:
- Create a "Casino-like" experience by holding and showing fighter icons as cards as in a casino table game.
- Add a "Reset Score" button to reset the score on click.
The project spec & rubric can be found here