Skip to content

Instantly share code, notes, and snippets.

@ryuheechul
Last active August 17, 2018 06:43
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 ryuheechul/3ed4a49d4d0cdf6c4a06ec52fb5451ec to your computer and use it in GitHub Desktop.
Save ryuheechul/3ed4a49d4d0cdf6c4a06ec52fb5451ec to your computer and use it in GitHub Desktop.
my Rainist holdem function for pycon
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