public
Last active

Ruby Golf - Hole 3: Rock, Paper, Scisors

  • Download Gist
play.rb
Ruby
1 2 3
def play(m)
a,c=%w(Rock Scissors Paper),rand(4);[a[c%3],%w(Draw Lose Win)[a.index(m)-c]]*','
end

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.