- Reset Game
- Book
- BASIC
-
Rock Scissors Paper
Original Resources
Download the original BASIC code. Check out the original page the text below was taken from in the Book.
Instructions From the Book
"Remember the game of rock-scissors-paper. You and your opponent make a motion three times with your fists and then either show a flat hand (paper), fist (rock), or two fingers (scissors). Depending upon what is shown, the gamie is a tie (both show the same) or one person wins. Paper wraps up rock, so it wins. Scissors cut paper, so they win. And rock breaks scissors, so it wins.
In this computerized version of rock-scissors-paper, you can play up to ten games vs. the computer.
Charles Lund wrote this game while at the American School in The Hague Netherlands."
Modifications For This Version
Other than adding some images for the user to click on to represent the weapons, I've pretty much changed nothing. It is, after all, a classic game that nearly everyone knows. The only other difference is that this version has no limit on the number of games. The score is kept in the top right corner of the faux-console.
Technical Stuff
This one is also using PHP, POST and SESSION variables, server pings, and page refreshes. I'm the first to admit that this program more than just about any other should not be written in PHP. It was an experiment in critical thinking. There are some unique issues that arise when using server side languages for a program like this.The good news is that I've already written the JavaScript version. I just need to update the CSS and add it to the site.
The Future
In addition to switching to the JS version, I'm also considering adding another feature or two. First, I want to allow the user to allow the game to be biased. In other words, allow the user to decide that rock (for example) comes up more frequently than the others. A second feature is the classic addition of lizard and spock.
Finally, I'd like to add in some Monte Carlo simulations to allow the user to run a million (or more) games and see what happens under different scenarios. For example, what happens if the user randomly chooses a weapon each game vs. what happens if the user plays the same weapon every game vs. what happens if the user plays what the computer just played on the last round, etc. But until all that happens . . .
Enjoy Rock Scissors Paper!