COMP 14 Spring 2004
Program 3: Rock-Paper-Scissors-Spock-Lizard Game IN A GUI!!!!
75 points
Assigned: Monday, February 14
Due: Wednesday, March 2 at 11:59 pm
Description
-
Design and implement an application that plays the Rock-Paper-Scissors-Spock-Lizard
game (a slight variation of the standard Rock-Paper-Scissors game) against
the computer.
-
When played between two people, each person picks one of five options (usually
shown by a hand gesture) at the same time, and a winner is determined.
-
Rock or Spock beats Scissors
-
Scissors or Lizard beats Paper
-
Paper or Spock beats Rock
-
Paper or Lizard beats Spock
-
Rock or Scissors beats Lizard
-
When the user makes a selection, the computer should make a radom selection,
update the GUI accordingly.
-
At that point, the program reveals both choices and displays a statement
indicating if the user won, the computer won, or if it was a tie.
-
The user will stop by clicking the exit button.
-
Look at OddsEvens.java for how I want
the game to play. There should at least be fields that show:
the user's selection, the computer's
selection, the winner of the round, the number of rounds played, the user's
score, the computer's
score, and the number of ties.
The Kicker...
I want a GUI version of this. There should be
buttons for rock, paper, scissors, spock and lizard, and an exit button,
as well as displays
showing the current round and score. The round and scores should
be initialized to zero.
What to Turn in
-
Your prog3_onyen.jar file (where onyen is your Onyen), which
includes your RockPaperScissors.java source file
-
short write-up of questions you had and/or problems you encountered while
doing this assignment
What to Do
Requirements
When the TA runs/examines your program, it must satisfy the following
requirements. The maximum point value for each is shown in brackets.
-
[5] Your Java source file, class, and Jar file must be appropriately named
(as specified above).
-
[15] The GUI should be set up in an intuitive fashion, the labels saying
relevant things, the buttons correctly labeled, etc.
-
[10] You should have all the buttons and labels, and text fields required
for someone to understand who doesn't already know the program.
-
[20] Upon the user pressing a button, all the relevant text fields should
be updated. For reference, play the OddsEvens.java
game.
-
[10] You must use meaningful variable names, which conform to the style
guidelines and Java naming convention discussed in class.
-
[15] You must comment your code, including block-like multi-line comments
and single-line comments where appropriate. In addition, your code must
be neatly and clearly formatted using appropriate "white space."
Notes:
-
If your program doesn't compile or run (i.e., has a syntax error), you
will receive 0 credit for the items listed above in bold (so at most 30/75
points). These requirements all involve reading input from and writing
output to the user.
-
Remember that an implicit requirement for all assignments is that your
code must include (at the top) the standard
program header with pledge, and your signed pledge must be on file.