Last active
August 17, 2018 06:43
-
-
Save ryuheechul/3ed4a49d4d0cdf6c4a06ec52fb5451ec to your computer and use it in GitHub Desktop.
my Rainist holdem function for pycon
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
from typing import List | |
from random import randint | |
from .core.cards import Card | |
from .player import Me, Other | |
def bet( | |
me: Me, | |
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: | |
bet_amt = randint(min_bet_amt, max_bet_amt) | |
if(bet_amt * 2 < max_bet_amt): | |
return bet_amt * 2 | |
return bet_amt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment