Skip to content

Instantly share code, notes, and snippets.

@lancereinsmith
Created December 13, 2020 19:36
Show Gist options
  • Save lancereinsmith/2ab721dccd8839548e45253205767696 to your computer and use it in GitHub Desktop.
Save lancereinsmith/2ab721dccd8839548e45253205767696 to your computer and use it in GitHub Desktop.
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