join to wait for
other threads to complete.
This applet works with a simple version of the "Gambler's Ruin" scenario: the gambler plays $1 dollar bets until either running out of money or reaching a target higher amount. In this applet, the gambler tries to double an initial $100 in two different games: even-money bets in roulette (18/38 probability of winning) and in coin tosses (1/2 probability of winning).