Last active
December 22, 2015 04:39
-
-
Save ajjahn/6418985 to your computer and use it in GitHub Desktop.
Ruby Golf - Paper, Rock, Scissors81 bytes between method definition.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def play(n) | |
s=%w[Paper Rock Scissors].rotate rand 3 | |
s[1]+%w[,Draw ,Lose ,Win][s.index(n)<=>1] | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment