25 lines
665 B
Python
25 lines
665 B
Python
|
|
# -*- coding: utf-8 -*-
|
||
|
|
# games/blackjack/models/bot_seat.py
|
||
|
|
from dataclasses import dataclass, field
|
||
|
|
from models.card import Card
|
||
|
|
from resources.code_res.game_constants import BJ_STARTING_GOLD
|
||
|
|
|
||
|
|
|
||
|
|
@dataclass
|
||
|
|
class BlackjackBotSeat:
|
||
|
|
name: str
|
||
|
|
ai_level: int
|
||
|
|
gold: int = BJ_STARTING_GOLD
|
||
|
|
hand: list[Card] = field(default_factory=list)
|
||
|
|
bet_in_pot: int = 0
|
||
|
|
cards_locked: bool = False
|
||
|
|
busted: bool = False
|
||
|
|
folded: bool = False
|
||
|
|
doubled: bool = False
|
||
|
|
acted_once: bool = False
|
||
|
|
status_text: str = ""
|
||
|
|
rebought: bool = False
|
||
|
|
|
||
|
|
@property
|
||
|
|
def is_active_in_pot(self) -> bool:
|
||
|
|
return not self.busted and not self.folded
|