• Post Reply Bookmark Topic Watch Topic
  • New Topic

Issues with Rock Paper Scissors game  RSS feed

 
Sam Kluender
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to create a Rock, Paper Scissors game doing it with methods I was instructed to use for an assignment.

Every time I try to run it no result will print. I think it has to do with winner being = in my pickWinner method but I don't know why it wont return the correct value.

I've tried many things, some of which will return the user always winning or losing.

Any help???

 
fred rosenberger
lowercase baba
Bartender
Posts: 12563
49
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
System.out.println is your best friend. Sprinkle them throughout your code to see what it is doing, then take them out when you don't need them.

but at a VERY high level...You don't want to do

personplay == "Rock"

you want to do

personplay.equals("Rock")
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!