Created
March 1, 2012 00:26
-
-
Save tlowrimore/1946092 to your computer and use it in GitHub Desktop.
Ruby Golf - Hole 3: Rock, Paper, Scisors
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(m) | |
a,c=%w(Rock Scissors Paper),rand(4);[a[c%3],%w(Draw Lose Win)[a.index(m)-c]]*',' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment