Skip to content

Instantly share code, notes, and snippets.

@DeeJayhX
Last active May 16, 2017 09:30
Show Gist options
  • Save DeeJayhX/6fea662e1bdadf5410569ad91c4446f9 to your computer and use it in GitHub Desktop.
Save DeeJayhX/6fea662e1bdadf5410569ad91c4446f9 to your computer and use it in GitHub Desktop.
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