packages = [
"pyroulette",
"matplotlib"
]
import pyroulette as pr
# seed(59)
from random import randint
players = []
for _ in range(1, 20):
c = randint(0, 3)
if c == 0:
min_games = randint(1, 100)
elif c == 1:
min_games = randint(1, 25)
else:
min_games = randint(1, 2)
players.extend(pr.generate_players(num_players=50, min_num_games=min_games, total_budget=100))
players = pr.play_roulette(players, games=100)
# get the wallet values for all players as a list
wallets = [player.wallet for player in players]
# plot the wallet values as a histogram
for p in sorted(players, reverse=True):
print(p, "\n ")