
    Ii                         % S r SSKJr  SSKJr   " S S\5      r\" SS9 " S S	5      5       r\" SS9 " S
 S5      5       r\" 5       \" 5       S.r\	\
\4   \S'   S\
S-  S\S-  4S jrS\\
S4   4S jrg)z(Rules profile models for Sorry editions.    )	dataclass)Protocolc                      \ rS rSr% Sr\\S'   \\S'   \\S'   S\\S4   4S jr	S	\S\
4S
 jrS	\S\\S4   4S jrS	\S\\S4   4S jrS	\S\
4S jrS	\S\
4S jrS	\S\
4S jrS	\S\\S4   4S jrS\
4S jrS\4S jrSrg)SorryRulesProfile   z3Protocol implemented by each Sorry ruleset profile.
profile_iddisplay_namepawns_per_playerreturn.c                     g)z-Return supported card faces for this profile.N selfs    7c:\Users\dbart\PlayPalace11\server\games\sorry\rules.py
card_facesSorryRulesProfile.card_faces           	card_facec                     g)z4Return whether this card can move a pawn from start.Nr   r   r   s     r   can_leave_start_with_card+SorryRulesProfile.can_leave_start_with_card   r   r   c                     g)z5Return forward step options contributed by this card.Nr   r   s     r   forward_steps_for_card(SorryRulesProfile.forward_steps_for_card   r   r   c                     g)z6Return backward step options contributed by this card.Nr   r   s     r   backward_steps_for_card)SorryRulesProfile.backward_steps_for_card   r   r   c                     g)z<Return whether this card allows split-seven move generation.Nr   r   s     r   allows_split_seven$SorryRulesProfile.allows_split_seven   r   r   c                     g)z5Return whether this card allows swap move generation.Nr   r   s     r   allows_swapSorryRulesProfile.allows_swap"   r   r   c                     g)z8Return whether this card allows Sorry replacement moves.Nr   r   s     r   allows_sorrySorryRulesProfile.allows_sorry&   r   r   c                     g)z?Return fallback forward steps used when no Sorry target exists.Nr   r   s     r   sorry_fallback_forward_steps.SorryRulesProfile.sorry_fallback_forward_steps*   r   r   c                     g)z*Return whether card 2 grants another turn.Nr   r   s    r   card_two_grants_extra_turn,SorryRulesProfile.card_two_grants_extra_turn.   r   r   c                     g)z4Return identifier for profile-specific slide policy.Nr   r   s    r   slide_policy_id!SorryRulesProfile.slide_policy_id2   r   r   r   N)__name__
__module____qualname____firstlineno____doc__str__annotations__inttupler   boolr   r   r   r!   r$   r'   r*   r-   r0   __static_attributes__r   r   r   r   r      s    =OE#s(O 3 4  c3h  sCx C D S T c d c eCHo D  r   r   T)frozenc                   ,   \ rS rSr% SrSr\\S'   Sr\\S'   Sr	\
\S'   S	r\\S
4   \S'   S\\S
4   4S jrS\S\4S jrS\S\\
S
4   4S jrS\S\\
S
4   4S jrS\S\4S jrS\S\4S jrS\S\4S jrS\S\\
S
4   4S jrS\4S jrS\4S jrSrg)Classic00390Rules7   z2Classic Sorry rules profile based on Hasbro 00390.classic_00390r   zClassic 00390r	      r
   )1234578101112sorry._facesr   c                     U R                   $ N)rN   r   s    r   r   Classic00390Rules.card_facesL   s    {{r   r   c                     US;   $ )N>   rC   rD   r   r   s     r   r   +Classic00390Rules.can_leave_start_with_cardO   s    J&&r   c                 (    US;   a  [        U5      4$ g)N>	   rC   rD   rE   rG   rH   rI   rJ   rK   rL   r   )r9   r   s     r   r   (Classic00390Rules.forward_steps_for_cardR   s    HH	N$$r   c                      US:X  a  gUS:X  a  gg)NrF   rB   rJ   )   r   r   r   s     r   r   )Classic00390Rules.backward_steps_for_cardW   s    r   c                     US:H  $ )NrH   r   r   s     r   r!   $Classic00390Rules.allows_split_seven^   s    Cr   c                     US:H  $ )NrK   r   r   s     r   r$   Classic00390Rules.allows_swapa   s    D  r   c                     US:H  $ )NrM   r   r   s     r   r'   Classic00390Rules.allows_sorryd   s    G##r   c                     Ung)Nr   r   )r   r   _s      r   r*   .Classic00390Rules.sorry_fallback_forward_stepsg   s
    r   c                     g)NTr   r   s    r   r-   ,Classic00390Rules.card_two_grants_extra_turnk   s    r   c                     g)NrA   r   r   s    r   r0   !Classic00390Rules.slide_policy_idn   s    r   r   N)r2   r3   r4   r5   r6   r   r7   r8   r	   r
   r9   rN   r:   r   r;   r   r   r   r!   r$   r'   r*   r-   r0   r<   r   r   r   r?   r?   7   s   <%J%'L#'cFE#s(O E#s(O '3 '4 ' c3h 
 sCx  C  D  !S !T !$c $d $c eCHo D  r   r?   c                      \ rS rSr% SrSr\\S'   Sr\\S'   Sr	\
\S'   S	\\S
4   4S jrS\S	\4S jrS\S	\\
S
4   4S jrS\S	\\
S
4   4S jrS\S	\4S jrS\S	\4S jrS\S	\4S jrS\S	\\
S
4   4S jrS	\4S jrS	\4S jrSrg)A5065CoreRulesr   zA5065 core profile.
a5065_corer   z
A5065 Corer	      r
   r   .c                 2    [        5       R                  5       $ rP   )r?   r   r   s    r   r   A5065CoreRules.card_facesz   s     "--//r   r   c                 6    [        U R                  U5      5      $ rP   )r;   r   r   s     r   r   (A5065CoreRules.can_leave_start_with_card}   s    D//	:;;r   c                 4    [        5       R                  U5      $ rP   )r?   r   r   s     r   r   %A5065CoreRules.forward_steps_for_card   s     "99)DDr   c                 4    [        5       R                  U5      $ rP   )r?   r   r   s     r   r   &A5065CoreRules.backward_steps_for_card   s     "::9EEr   c                 4    [        5       R                  U5      $ rP   )r?   r!   r   s     r   r!   !A5065CoreRules.allows_split_seven   s     "55i@@r   c                 4    [        5       R                  U5      $ rP   )r?   r$   r   s     r   r$   A5065CoreRules.allows_swap   s     "..y99r   c                 4    [        5       R                  U5      $ rP   )r?   r'   r   s     r   r'   A5065CoreRules.allows_sorry   s     "//	::r   c                     US:X  a  gg)NrM   rW   r   r   r   s     r   r*   +A5065CoreRules.sorry_fallback_forward_steps   s    r   c                     g)NFr   r   s    r   r-   )A5065CoreRules.card_two_grants_extra_turn   s    r   c                     g)Nrj   r   r   s    r   r0   A5065CoreRules.slide_policy_id   s    r   r   N)r2   r3   r4   r5   r6   r   r7   r8   r	   r
   r9   r:   r   r;   r   r   r   r!   r$   r'   r*   r-   r0   r<   r   r   r   rh   rh   r   s    "J"$L#$c0E#s(O 0<3 <4 <E Ec3h EF FsCx FAC AD A:S :T :;c ;d ;c eCHo 
D  r   rh   )rA   rj   RULES_PROFILESr   Nr   c                 4    U c  g[         R                  U 5      $ )z-Return profile object for a known profile id.N)r   get)r   s    r   get_rules_profile_by_idr      s    j))r   .c                  <    [        [        R                  5       5      $ )z0Return known profile ids in stable option order.)r:   r   keysr   r   r   get_supported_profile_idsr      s    $$&''r   )r6   dataclassesr   typingr   r   r?   rh   r   dictr7   r8   r   r:   r   r   r   r   <module>r      s    . ! - -` $7 7 7t $% % %R '( "0S++, *d
 *7H47O *(5c? (r   