Results 1 to 3 of 3
Thread: Rock Paper Scissors
- 04-23-2009, 06:11 AM #1Member
- Join Date
- Apr 2009
- Rep Power
Rock Paper Scissors
I need to make a program that will play rock paper scissors by the use typing 1,2, or 3 represtening the three different moves in rock paper scissors. Then the computer generate a random move... tell the winner and then tell the wins, loses, ties. Until the user wins then have it display "You have won!"
I made a previous java code that would decide winner but noe continue but it was way too long i want a more condensed code.
I think I speak for all here when I wish you much luck with this endeavor. Please let us know if you succeed with your goal here.
- 04-23-2009, 06:23 AM #3
Instead of of 1,2, or 3 why not use r, p or s... or even rock, paper or sciss ?
I would think it would go something like this:
Read user input Generate random number (using the Random class) associate the random number to option using an array, switch-case, etc Compare user input to random option do calcs print results
Difficult? This is Mission Impossible, not Mission Difficult. Difficult should be easy.
- By machine949 in forum New To JavaReplies: 1Last Post: 04-22-2009, 05:09 PM
- By kingsun in forum New To JavaReplies: 3Last Post: 11-17-2008, 04:35 AM
- By GettinGwap in forum New To JavaReplies: 12Last Post: 10-19-2008, 06:15 PM
- By Alberto in forum New To JavaReplies: 2Last Post: 02-12-2008, 12:18 AM