Results 1 to 3 of 3
  1. #1
    54byler is offline Member
    Join Date
    Apr 2009
    Posts
    2
    Rep Power
    0

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

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    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.

  3. #3
    CJSLMAN's Avatar
    CJSLMAN is offline Moderator
    Join Date
    Oct 2008
    Location
    Mexico
    Posts
    1,159
    Rep Power
    7

    Default

    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:

    Java Code:
    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
    Luck,
    CJSL
    Chris S.
    Difficult? This is Mission Impossible, not Mission Difficult. Difficult should be easy.

Similar Threads

  1. trying to get code in paper form....
    By machine949 in forum New To Java
    Replies: 1
    Last Post: 04-22-2009, 05:09 PM
  2. Need Help with Rock paper and Scissors Java Game
    By kingsun in forum New To Java
    Replies: 3
    Last Post: 11-17-2008, 03:35 AM
  3. Need help with Rock Paper Scissors Game
    By GettinGwap in forum New To Java
    Replies: 12
    Last Post: 10-19-2008, 06:15 PM
  4. Paper,Scissor,Rock If then Statements
    By Alberto in forum New To Java
    Replies: 2
    Last Post: 02-11-2008, 11:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •