
    Iig                    H    S SK Jr  S SKJr  S SKJr  \ " S S\5      5       rg)    )annotations)	dataclass)DataClassJSONMixinc                  T    \ rS rSr% SrSrS\S'   SrS\S'   SS	 jrSS
 jr	SS jr
Srg)PokerTableState   zTrack dealer/button and blind positions.

Attributes:
    button_index: Index into current active player list.
    button_player_id: Stored player id for button continuity.
r   intbutton_indexN
str | Nonebutton_player_idc                (   U(       d  SU l         SU l        gU R                  (       a1  U R                  U;   a!  UR                  U R                  5      U l         OSU l         U R                   S-   [        U5      -  U l         XR                      U l        g)z-Advance the button to the next active player.r   N   )r
   r   indexlenself
active_idss     <c:\Users\dbart\PlayPalace11\server\game_utils\poker_table.pyadvance_buttonPokerTableState.advance_button   s|     !D$(D!  T%:%:j%H * 0 01F1F GD !D!..2c*oE *+<+< =    c                    U(       d  gU R                   (       a  U R                   U;   a  U R                   $ XR                  [        U5      -     $ )z1Return the current button player id if available.N)r   r
   r   r   s     r   get_button_idPokerTableState.get_button_id"   sB      T%:%:j%H(((++c*o=>>r   c                    U(       d  g[        U5      S:X  a  U R                  S-  nUS-   S-  nX#4$ U R                  S-   [        U5      -  nUS-   [        U5      -  nX#4$ )z?Return (small_blind_index, big_blind_index) for active players.)r   r      r   )r   r
   )r   r   sbbbs       r   get_blind_indices!PokerTableState.get_blind_indices*   sj    z?a""Q&Bq&AB8O!#s:61fJ'xr   )r
   r   )r   	list[str]returnNone)r   r!   r"   r   )r   r!   r"   ztuple[int, int])__name__
__module____qualname____firstlineno____doc__r
   __annotations__r   r   r   r   __static_attributes__ r   r   r   r      s-     L##'j'>?
r   r   N)
__future__r   dataclassesr   mashumaro.mixins.jsonr   r   r+   r   r   <module>r/      s*    " ! 4 +( + +r   