Created
August 19, 2018 05:22
-
-
Save junho85/891a14cd98701f36abafa2bbc25ce10a to your computer and use it in GitHub Desktop.
turn.py
This file contains hidden or 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
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