Last active
May 16, 2017 09:30
-
-
Save DeeJayhX/6fea662e1bdadf5410569ad91c4446f9 to your computer and use it in GitHub Desktop.
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
class Roulette | |
def betting | |
print "betting1" | |
roll | |
end | |
def roll | |
print "roll1" | |
betting | |
end | |
end | |
class Crash | |
def betting | |
print "betting2" | |
roll | |
end | |
def roll | |
print "roll2" | |
betting | |
end | |
end | |
roulette = Roulette.new() | |
crash = Crash.new() | |
Thread.new { roulette.betting } | |
#The rest of this never gets called, there's an infinite loop in roulette, but | |
#it shouldn't matter because it should be off in it's own thread now... | |
Thread.new { crash.betting } | |
loop{ | |
puts "TEST" | |
sleep(5) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment