Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from typing import List
- from .core.cards import Card
- from .player import Other
- from .core.madehands import evaluate
- 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:
- value = evaluate(my_cards,community_cards)
- if value[0] >= 5:
- if my_chips >= max_bet_amt:
- return max_bet_amt
- elif my_chips >= min_bet_amt:
- return min_bet_amt
- if len(community_cards) > 2:
- return 0
- else:
- return min_bet_amt if my_chips >= min_bet_amt else 0
Add Comment
Please, Sign In to add comment