sort players by wallet

This commit is contained in:
Michael Pilosov 2022-11-27 00:48:29 -07:00
parent 23f2bbd4bd
commit 6364a54979
2 changed files with 3 additions and 3 deletions

View File

@ -280,7 +280,7 @@ 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}, budget={self.budget}, wallet={self.wallet}, "
+ f"num_placements={len(self.strategy.placements)}, "
+ f"strategy_budget={self.strategy.budget}, "
+ f"strategy_cost={self.strategy.value}"
@ -289,7 +289,7 @@ class Player:
)
def __lt__(self, other):
return self.id < other.id
return self.wallet < other.wallet
def expected(bet: Bet) -> float:

View File

@ -10,7 +10,7 @@ with open(BASEDIR.joinpath("README.md"), "r") as fp:
setup(
name="pyroulette",
version="0.0.2",
version="0.0.3",
description="A package for exploring roulette strategies.",
long_description=LONG_DESCRIPTION,
long_description_content_type="text/markdown",