Skip to content

Instantly share code, notes, and snippets.

@b2climbing
Created August 17, 2009 08:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save b2climbing/169004 to your computer and use it in GitHub Desktop.
Save b2climbing/169004 to your computer and use it in GitHub Desktop.
class RouletteTable
BLACk=[2,4,6,8,10,11,13,15,17,20,22,24,26,28,29,31,33,35]
RED=[1,3,5,7,9,12,14,16,18,19,21,23,25,27,30,32,34,36]
def self.spin
result = rand(37)
return :green if result == 0
return :black if BLACk.include?(result)
return :red if RED.include?(result)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment