Fundamentals Lite
  • πŸš€Course Overview
  • Course Logistics
    • 🏫Course Methodology
      • 🧩Course Components
      • πŸ’¬Course Communication
    • πŸ’»Required Hardware and Software
      • ☝️Required Software 1
      • ✌️Required Software 2
      • πŸ‘Recommended Setup
    • πŸ“…Schedule
    • πŸ’‘Tips and Tricks
      • πŸ“’Coding Strategies
      • πŸ› οΈTooling Pro Tips
    • πŸŽ“Post-Course
      • πŸš€Upgrading to Paid Fundamentals
      • πŸš‚Bootcamp Admission Criteria
      • πŸ“ΉBootcamp Video Application
  • 1: Introduction
    • 1.1: What is Coding?
    • 1.2: Web Browsers
    • 1.3: Command Line
    • Additional Resources 1
  • 2: Basic Data Manipulation
    • 2.1: Operations
    • 2.2: Variables
    • 2.3: Our First Program
    • Additional Resources 2
  • 3: Structuring and Debugging Code
    • 3.1: Functions
    • 3.2: Errors
    • Additional Resources 3
  • 4: Conditional Logic
    • 4.1: Intro to Logic
    • 4.2: Pseudo-Code, Boolean OR
    • 4.3: Boolean AND, NOT
    • 4.4: Input Validation
    • Additional Resources 4
  • 5: Managing State and Input Validation
    • 5.1: Program Lifecycle and State
    • 5.2: Program State for Game Modes
    • Additional Resources 5
  • 6: Arrays and Iteration
    • 6.1: Arrays
    • 6.2: Loops
    • 6.3: Loops with Arrays
    • Additional Resources 6
  • 7: Version Control
    • 7.1: Git
    • Additional Resources 7
  • 8: GitHub
    • 8.1: Intro to GitHub
    • 8.2: GitHub Fork and Clone
    • 8.3: GitHub Pull Request
    • 8.4: GitHub Repo Browsing
    • 8.5: Deployment
    • Additional Resources 8
  • Homeworks
    • Day 2: Basic File and Data Manipulation
    • Day 3: Functions
    • Day 4: If Statements, Boolean Or, Boolean And
    • Day 5: Program State
    • Day 7: Loops
    • Day 8: Arrays and Loops
  • Projects
    • Project 1: Scissors Paper Stone
      • Project 1: Scissors Paper Stone (Part 1)
      • Project 1: Scissors Paper Stone (Part 2)
    • Project 2: Beat That!
Powered by GitBook
On this page
  • Introduction
  • Past Projects
  • Base
  • Win-Loss Record
  • User Name
  • Formatting
  • More Comfortable
  • Reverse Game Mode
  • Korean Scissors Paper Stone
  • Versions
  • Computer vs. Computer
  • Further Variations
  • Submit
  • Reference Solution
  1. Projects
  2. Project 1: Scissors Paper Stone

Project 1: Scissors Paper Stone (Part 2)

βœ‚οΈπŸ“ƒπŸ’ŽπŸ€©

PreviousProject 1: Scissors Paper Stone (Part 1)NextProject 2: Beat That!

Last updated 2 years ago

Introduction

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.

Past Projects

Take a look at past projects by previous Fundamentals students to visualise how the full game can look like.

Base

Win-Loss Record

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.

User Name

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.

Formatting

The computer chose scissors βœ‚οΈ.
You chose paper πŸ—’.

You lose! Bummer.

So far Kai, you've been winning 5/7 turns. Pretty good!

More Comfortable

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.

Reverse Game Mode

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.

Korean Scissors Paper Stone

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.

Versions

Allow the player to select if they want to play normal or Korean versions of the game.

Computer vs. Computer

Add a mode that lets the computer choose for you on each turn.

Further Variations

Submit

Reference Solution

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.

Congrats on finishing! If you would like Rocket to review your code and share individual feedback, please join the paid version of our Fundamentals course by emailing and letting us know you would like to transfer. If you plan to join Rocket’s Bootcamp, we highly recommend joining paid Fundamentals. Thank you!

for SPS-Part2 (up till More Comfortable).

new lines
Wikipedia
muk-jji-ppa
here
jill@rocketacademy.co
View the reference solution
Muk-jji-ppa
Regular and Reverse
state
Base features of SPS Part 1
game states
global varaibles