-
-
Save lancereinsmith/2ab721dccd8839548e45253205767696 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def ante(self, ante_amount: int = ANTE_AMOUNT) -> int: | |
"""Antes the player into the pot. Returns amount anted. | |
Keyword arguments: | |
ante_amount -- amount each player must ante (default set above) | |
""" | |
if self.is_bankrupt(): | |
return 0 | |
if self.bank < ante_amount: | |
money_left = self.bank | |
self.bank = 0 | |
return money_left | |
else: | |
self.bank -= ante_amount | |
return ante_amount | |
.... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment