7 kyu
Rock Paper Scissors Lizard Spock
2,107 of 4,889corsmond
Loading description...
Fundamentals
Logic
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
Python:
Log: Player 1 won! should equal: Player 1 Won!
It's a problem with your solution, not with the kata. See this for help: https://docs.codewars.com/training/training-example/#writing-a-solution
Your answer isn't correct.
TypeScript translation is waiting for approval.
Prolog translation
Approved
May I add that 'technically' Rock blunts Scissors, not crushes. :P
when I grew up playing this hand to hand with a friend or sibling, there would always be a response move:
when player 1 put out paper, and player 2 put out scissors, player 2 would literally use a snipping action on the loser's "paper"
when player 1 put out rock, and player 2 put out paper, player 2 would wrap their hand around the opponent's "rock", to cover it up
when player 1 put out scissors, and player 2 put out rock, player 2 would commit a smashing action directly on top of the "scissors"
LC translation
Better with Chuck Norris, and not with Spock Nice kata
Chuck Norris beats everything, so it's pointless to play with him
This comment has been hidden.
This comment has been hidden.
your code is incorrect. you pass the sample tests, not the full tests suite. print the input to see which cases you are failing
Factor translation
Approvalised.
This comment has been hidden.
Use a simple loop, the return of forEach isn't working as you think it should.
Oh, I see now. One does not simply break out of .forEach loop! Thanks for response. I learned something today!
cool kata, took me awhile
Hi. Why can't I pass the random test? gives me the correct answer in VS CODE
Test Results: rock paper scissors lizard spock Random test Log Player 2 Won! Didn't work for the following combination: paper and scissors: expected undefined to equal 'Player 2 Won!'
Run this code locally in your VS Code and tell me what happens:
console.info("For paper and rock, my solution returns: " + rpsls('paper', 'rock'));
There is something wrong with this kata.
@hobovsky my result "Player 1 Won!"
You have some problem in your code like this:
console.log
returns undefined.@chrono79 thanks!
Ruby:
Fixed.
Lua translation!
Approved
Ruby translation https://www.codewars.com/kumite/62ff9bc2fab8d2091f599892?sel=62ff9bc2fab8d2091f599892
Please review as I am a total Ruby idiot.
.
Fork for description update as discussed here.
Please help i passed all the basic tests but but I keep getting errors in the random test. and i think my code is accurate
your dictionary / code are incorrect, not a kata issue
Please use
Question
label when you have problems with your code instead ofIssue
. Your code didn't pass all the sample tests.C translation (author inactive)
Approved :)
This kata is a subject to deduplication process here: https://github.com/codewars/content-issues/issues/66 Please join the discussion to help us identify duplicate kata and retire them.
This kata was decided to stay.
exact duplicate of https://www.codewars.com/kata/569651a2d6a620b72e000059 (minus data validation)
raised here should be handled within 1 year of time ~~ XD
C# Translation description updated with language-specific block.
Approved
Python Translation
already approved by someone
Haskell translation
Approved by someone
And there are still no random tests.
I have added the random tests.
The description needs some serious formatting and paragraphing. It's unreadable.
Please check it now.
Looks good now ;-)
(Though you might want to fix the bold formatting error.)
Boldness fixed, where no fix has gone before
Needs random tests.
Why does it need random tests?
Because it helps prevent cheaters from pattern-matching the test cases instead of actually coding up a proper algorithm.
Note that all your tests are sequential (first Player 1 win, then Player 2 win, then draw), so it's trivial to feed sequential data to pass the tests.
Perhaps someone likes c# or ruby, same here: https://www.codewars.com/kata/rock-paper-scissors-lizard-spock-game (Some little changes and same code works;-))