Project 1: Scissors Paper Stone (Part 2)
✂️📃💎🤩
Last updated
✂️📃💎🤩
Last updated
Part 2 assumes we have learned about global variables, and the More Comfortable section assumes we know how to use as game modes. We'll now update our SPS Part 1 to support .
If you completed the but didn't finish the More Comfortable section, please complete Base for SPS Part 2 before going back to attempting More Comfortable for both parts.
Take a look at past projects by previous Fundamentals students to visualise how the full game can look like.
Add to your program such that it keeps track of the number of times the user has won and the number of times the computer has won. Output this win-loss record in a format you like in the program output. You can also output the number of draws and/or each party's winning percentage if you'd like.
To make this game more personal, add a feature to collect the user's name as the first input after the page loads. We can prompt the user to enter their name first by adding to the page's HTML. Once the user submits their name, the program can return output to prompt the user to start playing Scissors Paper Stone by entering one of the 3 objects. Use the user's name to personalise win-loss record and other relevant output.
There is no need to implement all the different features sequentially in one version of your game. Feel free to choose what you find interesting and appropriately challenging and implement only that.
You decide to prank your friends and create an SPS game mode where the rules are reversed: scissors beat stone, stone beats paper, and paper beats scissors. Create a game mode where if a user types in "reverse", it reverses the SPS rules.
Update your program state such that it can keep track of the most recent winner, and update the program logic to declare the most recent winner the ultimate winner when there is a draw.
Allow the player to select if they want to play normal or Korean versions of the game.
Add a mode that lets the computer choose for you on each turn.
Share your work with your Section mates for peer-learning, and with your SLs for review.
Copy code from script.js
into a new gist.
Title the Gist and the file as you wish
Share your Gist on your community channel!
Include the following questions, along with your answers, at the top of your gist:
Share the link to your gist with your Section in your community channel!
The reference solution implements the Base functionality for both SPS Parts 1 and 2. Please only refer to the reference solution after you have attempted the project. Note that there are many ways to implement the project and the reference solution is only 1 way.
Make the output of your game look nice. You can use the string '<br>'
to create in the output. Add the user name and the win/loss record. Format a message depending on how well the player is doing:
The following is adapted from :
In Korea, a two-player upgraded version exists by the name . After showing their hands, the player with the winning throw shouts "muk-jji-ppa!" upon which both players throw again. If they throw differently (for example, rock and paper, or paper and scissors), whoever wins this second round shouts "muk-jji-ppa!" and thus the play continues until both players throw the same item (for example, rock and rock), at which point whoever was the last winner becomes the actual winner.
Implement other variations to the game as described . The user can select which variation they would like to play.
Go to and login with your GitHub account.
for SPS-Part2 (up till More Comfortable).