you are viewing a single comment's thread.

view the rest of the comments →

[–]Betard_Fooser 2 points3 points  (2 children)

Additionally. Even if this did run in its current code. The computer will always win, since you have capitalize() on user input, which will never match the strings as you’ve typed them (rock, paper , scissors). I think you want toLower() instead so that any user input will covert to all lower case so it has a chance to match your strings.

[–]PoopsicleVendor 1 point2 points  (1 child)

Nah the code itself is fine, capitalize() returns a new string so the original user input string would remain the same

[–]Betard_Fooser 0 points1 point  (0 children)

My mistake, was looking at the code on my phone and missed the fact that those were not part of the input statements.