Skip to content

Instantly share code, notes, and snippets.

View BytefishMedium's full-sized avatar

Shuai Li 李帅 BytefishMedium

View GitHub Profile
import random
import matplotlib.pyplot as plt
def simulate_game(A_start, B_start):
"""Simulate a single game until one player loses all money."""
A_money = A_start
B_money = B_start
while A_money > 0 and B_money > 0: