CSC 9010 Design and Implementation of Computer
Games
First Assignment: Rock-Scissors-Paper
David Matuszek, Villanova University, Spring 2001
Source: Art Explosion 125000 Images
Your assignment is to write, in Java, a program to play Rock-Scissors-Paper (also called Scissors-Paper-Stone and other variations; other names are Roshambo and Jan-Ken-Pon). For this assignment, your Java program should be entirely your own: do not copy code from anywhere, and do not use a graphical IDE to generate part of your code.
In this two-player game, each player chooses one of Rock, Scissors, or Paper. The winner is determined as follows:
Your program is to (randomly) choose one of the three options, accept the human's choice, and display the result. It should keep a running total of the number of games played and the number won, and display this result after each game.
You may write this program either as an application or as an applet. A graphical user interface is strongly preferred, but a text-only interface will also be acceptable.
Turn in your program on a floppy. The floppy should have a proper disk label, not a homemade one, with your name on it. The floppy should contain:
vdd.txt, that
.class files
and (in the case of an applet) the .html file. I
should not have to compile your program myself.All human-readable files should have your name prominently displayed near the top of the file. No paper will be accepted with the disk. Be sure to keep a backup copy in case of disk problems.
For more information, see:
The Second International RoShamBo Programming Competition, http://www.cs.ualberta.ca/~darse/rsbpc.htmlEverything2, http://www.everything2.com/index.pl?node=rock,%20paper,%20scissors
Due date: One week from today: Monday, January 22.