How to Expand the Rock, Paper, Scissors Game in MicroWorlds EX
Have you created the Rock, Paper, Scissors project from Coding For Kids For Dummies? A fun enhancement you can make to your game is to add a lizard and the Star Trek character Spock to your game. Now it is Rock, Paper, Scissors, Lizard, Spock — the game made popular by Sheldon’s character on The Big Bang Theory.
You will need to add a shape and a button for the lizard and another shape and button for Spock. The following figure is an example of what the game will look like after it’s completed in MicroWorlds EX.
Google the words Rock, Paper, Scissors, Lizard, Spock to learn the rules for how the additional characters win or lose in the game. Can you figure out how to code the additional rules? If you need help, the following figure shows the enhanced version.
Math Connection: In Rock, Paper, Scissors, there is a one-third probability of a draw. In Rock, Paper, Scissors, Lizard, Spock, there is only a one-fifth probability of a draw.
Another enhancement to either the basic Rock, Paper, Scissors game or the Rock, Paper, Scissors, Lizard, Spock game is to incorporate nested procedures in your code. Look carefully as the consequences of the IF AND THEN conditionals in each game. Do you see repeated code? Can you write and name a procedure for that code and then nest it in the game by substituting the new name for the original code? Now you’re thinking like a coder!