Skip to content

Instantly share code, notes, and snippets.

@junho85
Created August 19, 2018 05:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save junho85/891a14cd98701f36abafa2bbc25ce10a to your computer and use it in GitHub Desktop.
Save junho85/891a14cd98701f36abafa2bbc25ce10a to your computer and use it in GitHub Desktop.
turn.py
from typing import List
from .core.cards import Card
from .player import Other
def bet(
my_chips: int,
my_cards: List[Card],
bet_players: List[Other],
betting_players: List[Other],
community_cards: List[Card],
min_bet_amt: int,
max_bet_amt: int,
total_bet_amt: int
) -> int:
if my_chips >= min_bet_amt:
if my_cards[0].rank == my_cards[1].rank:
return min(max_bet_amt, min_bet_amt)
elif my_cards[0].rank >= 11 or my_cards[1].rank >= 11:
return min(max_bet_amt, min_bet_amt)
return 0
else:
return 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment