Created
August 17, 2009 08:51
-
-
Save b2climbing/169004 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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