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.
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