Origin & Goals
The development for this project included the use of DOM manipulation techniques, event listeners, and loops/iteration. These topics had come up in the book I was reading, and I wanted a chance to use them for real.
- One of the 3 (Rock, Paper, Scissor) buttons is clicked.
- The computer then generates a random number that is assigned to Rock, Paper, or Scissors.
- The user’s choice and computer’s choice are checked.
- The user’s score or the computer’s score is increased by one… or no one’s score (a tie) is raised.
- Update all the page’s results so the user is aware of what happened.
The main game area has a border around it so the user can feel confident that is the only area they need to look at. The three main clickable buttons all have their areas shaded with grey, and hovering over them adds a solid blue border to further indicate they can be clicked. The below area contains results and score information for the player to glance at.
Improvements to be Made
Further development of this project is limited, as it was intended to just be a quicker experiment project. However,in any future versions, I do plan to make some changes. First, I want to have a graphical version of what the user and computer each chose, as well as a visual cue as to who won. There should be more of an indication that there was a change to the results area the first time someone clicks on a button as well. If I wanted to go completely overboard, I could try to practice some PHP by adding a database to store game results.