
    Ii	                         S r SSKJrJr  SSKJrJr  SSKJrJ	r	J
r
  SSKJr  \ " S S	\5      5       r\ " S
 S\5      5       rg)z(Player and Options definitions for Coup.    )	dataclassfield   )PlayerGameOptions)	IntOption
BoolOptionoption_field   )Cardc                       \ rS rSr% SrSr\\S'   \" \	S9r
\	\   \S'   Sr\\S'   \" \	S9r\	\   \S	'   \S
\	\   4S j5       r\S
\	\   4S j5       rS\S
\4S jrS\S
S4S jrSrg)
CoupPlayer	   zPlayer state for Coup.r   coins)default_factory
influencesFis_deadaction_historyreturnc                 j    U R                    Vs/ s H  oR                  (       a  M  UPM     sn$ s  snf )z.Get the player's alive (face-down) influences.r   is_revealedselfcards     7c:\Users\dbart\PlayPalace11\server\games\coup\player.pylive_influencesCoupPlayer.live_influences   s&     "&I8H8HIII   00c                 j    U R                    Vs/ s H  oR                  (       d  M  UPM     sn$ s  snf )z+Get the player's dead (face-up) influences.r   r   s     r   dead_influencesCoupPlayer.dead_influences   s&     "&E4D4DEEEr   	characterc                 B   ^ [        U4S jU R                   5       5      $ )z=Check if the player has a specific alive character influence.c              3   @   >#    U  H  oR                   T:H  v   M     g 7f)N)r#   ).0r   r#   s     r   	<genexpr>+CoupPlayer.has_influence.<locals>.<genexpr>   s     P;O4>>Y.;Os   )anyr   )r   r#   s    `r   has_influenceCoupPlayer.has_influence   s    P4;O;OPPP    indexNc                     U R                   nSUs=::  a  [        U5      :  a'  O  O$X!   nU R                   H  nXCL d  M	  SUl          O   U R                   (       d  SU l        gg)z&Reveal a specific influence (it dies).r   TN)r   lenr   r   r   )r   r-   livetarget_cardr   s        r   reveal_influenceCoupPlayer.reveal_influence    s[    ##!D	!+K&'+D$ (
 ##DL $r,   )r   )__name__
__module____qualname____firstlineno____doc__r   int__annotations__r   listr   r   r   boolr   strpropertyr   r!   r*   r2   __static_attributes__ r,   r   r   r   	   s     E3N"48JT
8GT %d ;NDI;Jd J J Fd F FQs Qt Q c  d  r,   r   c                   z    \ rS rSr% Sr\" \" SSSSSSS	S
S95      r\\	S'   \" \" SSSSSSSSS95      r
\\	S'   Srg)CoupOptions/   zOptions for Coup.   r      secondszcoup-set-timer-durationzcoup-enter-timer-durationzcoup-option-changed-timerzcoup-desc-timer-duration)defaultmin_valmax_val	value_keylabelprompt
change_msgdescriptiontimer_duration_seconds
      r   zcoup-set-mandatory-coupzcoup-enter-mandatory-coupz"coup-option-changed-mandatory-coupzcoup-desc-mandatory-coupmandatory_coup_thresholdr@   N)r4   r5   r6   r7   r8   r
   r   rO   r9   r:   rR   r?   r@   r,   r   rB   rB   /   sk    ".+.22		
#C  %1+.;2		
%c r,   rB   N)r8   dataclassesr   r   
games.baser   r   game_utils.optionsr   r	   r
   cardsr   r   rB   r@   r,   r   <module>rW      sN    . ( - E E  "  "  " J +  r,   