in games/play.py [0:0]
def plot_scores(players):
num_games = len(players["player_0"].scores)
# Setting the global font size
plt.rcParams.update(
{"font.size": 24, "font.family": "serif", "font.serif": ["PT Serif"]}
) # Adjust font size here
plt.figure(figsize=(10, 6), constrained_layout=True)
plt.plot(
range(num_games),
players["player_0"].scores,
label="Ares Wins",
color="blue",
linewidth=5, # Thicker line
)
plt.plot(
range(num_games),
players["player_1"].scores,
label="Athena Wins",
color="red",
linewidth=5, # Thicker line
)
plt.xlabel("Number of Turns", fontsize=26)
plt.ylabel("Cumulative Wins", fontsize=26)
plt.title("Cumulative Wins Over Time for Rock-Paper-Scissors", fontsize=28)
plt.legend(fontsize=24)
plt.grid(True, linewidth=1.2)
plt.tight_layout(pad=0)
plt.show(block=True)