sort players by wallet
This commit is contained in:
parent
23f2bbd4bd
commit
6364a54979
@ -280,7 +280,7 @@ class Player:
|
|||||||
def __repr__(self) -> str:
|
def __repr__(self) -> str:
|
||||||
_nl = "\n\t" # custom newline character
|
_nl = "\n\t" # custom newline character
|
||||||
return (
|
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"num_placements={len(self.strategy.placements)}, "
|
||||||
+ f"strategy_budget={self.strategy.budget}, "
|
+ f"strategy_budget={self.strategy.budget}, "
|
||||||
+ f"strategy_cost={self.strategy.value}"
|
+ f"strategy_cost={self.strategy.value}"
|
||||||
@ -289,7 +289,7 @@ class Player:
|
|||||||
)
|
)
|
||||||
|
|
||||||
def __lt__(self, other):
|
def __lt__(self, other):
|
||||||
return self.id < other.id
|
return self.wallet < other.wallet
|
||||||
|
|
||||||
|
|
||||||
def expected(bet: Bet) -> float:
|
def expected(bet: Bet) -> float:
|
||||||
|
2
setup.py
2
setup.py
@ -10,7 +10,7 @@ with open(BASEDIR.joinpath("README.md"), "r") as fp:
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="pyroulette",
|
name="pyroulette",
|
||||||
version="0.0.2",
|
version="0.0.3",
|
||||||
description="A package for exploring roulette strategies.",
|
description="A package for exploring roulette strategies.",
|
||||||
long_description=LONG_DESCRIPTION,
|
long_description=LONG_DESCRIPTION,
|
||||||
long_description_content_type="text/markdown",
|
long_description_content_type="text/markdown",
|
||||||
|
Loading…
Reference in New Issue
Block a user