printing improvements
This commit is contained in:
parent
b78eadc4dc
commit
3ef0072a80
3
app.py
3
app.py
@ -112,9 +112,8 @@ if __name__ == "__main__":
|
||||
|
||||
print("======================")
|
||||
print("SIMULATING GAMES")
|
||||
# simulate 10 games
|
||||
# seed(59)
|
||||
players = play_roulette(players, games=100000)
|
||||
players = play_roulette(players, games=1000)
|
||||
|
||||
for p in sorted(players):
|
||||
print(p, "\n")
|
||||
|
@ -280,10 +280,12 @@ class Player:
|
||||
def __repr__(self) -> str:
|
||||
_nl = "\n\t" # custom newline character
|
||||
return (
|
||||
f"Player(id={self.id}, budget={self.budget}, wallet={self.wallet}, "
|
||||
f"Player(id={self.id}, "
|
||||
+ f"budget={round(self.budget, 2)}, "
|
||||
+ f"wallet={round(self.wallet, 2)}, "
|
||||
+ f"num_placements={len(self.strategy.placements)}, "
|
||||
+ f"strategy_budget={self.strategy.budget}, "
|
||||
+ f"strategy_cost={self.strategy.value}"
|
||||
+ f"strategy_budget={round(self.strategy.budget, 2)}, "
|
||||
+ f"strategy_cost={round(self.strategy.value, 2)}"
|
||||
+ f"\nstrategy:{_nl}{_nl.join(map(str, sorted(self.strategy.placements)))}"
|
||||
+ "\n)"
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user