source/client/RunManagement.py
def restoreRunAssignment(visible_scards_dictionary, wild_numbers, numsets):
    """ Convert scards to cards and assign values to Wild cards and Aces in runs from server.

    Needed to maintain integrity of Wilds' assigned values in runs.  Server does not know tempnumbers
    (for backwards compatability not changing json between server and client).
    There's no ambiguity except for wilds and Aces at the ends of the run (processRuns handles wilds in middle).
    """

    if len(visible_scards_dictionary) == 0:
        return(visible_scards_dictionary)
    cardgroup_dictionary = {}
    for key, scard_group in visible_scards_dictionary.items():
        card_group = []
        for scard in scard_group:
            card = Card(scard[0], scard[1], scard[2])
            card_group.append(card)
        cardgroup_dictionary[key] = card_group
    for k_group, card_group in cardgroup_dictionary.items():
        if k_group[1] >= numsets and len(card_group) > 1:       # check if this is a run.
            if card_group[-1].number in wild_numbers:    # reset tempnumber for Wilds/Aces if they are at the end.
                card_group[-1].assignWild(card_group[-2].tempnumber + 1)
            elif card_group[-1].number == 1:
                card_group[-1].assignWild(14)
            if card_group[0].number in wild_numbers:
                card_group[0].assignWild(card_group[1].tempnumber - 1)
            elif card_group[0].number == 1:
                card_group[0].assignWild(-1)
    return cardgroup_dictionary
 Convert scards to cards and assign values to Wild cards and Aces in runs from server.

    Needed to maintain integrity of Wilds' assigned values in runs.  Server does not know tempnumbers
    (for backwards compatability not changing json between server and client).
    There's no ambiguity except for wilds and Aces at the ends of the run (processRuns handles wilds in middle).
    
Convert scards to cards and assign values to Wild cards and Aces in runs from server.
Needed to maintain integrity of Wilds' assigned values in runs.  Server does not know tempnumbers
(for backwards compatability not changing json between server and client).
There's no ambiguity except for wilds and Aces at the ends of the run (processRuns handles wilds in middle).
Convert scards to cards and assign values to Wild cards and Aces in runs from server . Needed to maintain integrity of Wilds ' assigned values in runs . Server does not know tempnumbers ( for backwards compatability not changing json between server and client ) . There ' s no ambiguity except for wilds and Aces at the ends of the run ( processRuns handles wilds in middle ) .
def restoreRunAssignment(visible_scards_dictionary, wild_numbers, numsets):
    if len(visible_scards_dictionary) == 0:
        return(visible_scards_dictionary)
    cardgroup_dictionary = {}
    for key, scard_group in visible_scards_dictionary.items():
        card_group = []
        for scard in scard_group:
            card = Card(scard[0], scard[1], scard[2])
            card_group.append(card)
        cardgroup_dictionary[key] = card_group
    for k_group, card_group in cardgroup_dictionary.items():
        if k_group[1] >= numsets and len(card_group) > 1:       
            if card_group[-1].number in wild_numbers:    
                card_group[-1].assignWild(card_group[-2].tempnumber + 1)
            elif card_group[-1].number == 1:
                card_group[-1].assignWild(14)
            if card_group[0].number in wild_numbers:
                card_group[0].assignWild(card_group[1].tempnumber - 1)
            elif card_group[0].number == 1:
                card_group[0].assignWild(-1)
    return cardgroup_dictionary
def restoreRunAssignment ( visible_scards_dictionary , wild_numbers , numsets ) : if len ( visible_scards_dictionary ) == 0 : return ( visible_scards_dictionary ) cardgroup_dictionary = { } for key , scard_group in visible_scards_dictionary . items ( ) : card_group = [ ] for scard in scard_group : card = Card ( scard [ 0 ] , scard [ 1 ] , scard [ 2 ] ) card_group . append ( card ) cardgroup_dictionary [ key ] = card_group for k_group , card_group in cardgroup_dictionary . items ( ) : if k_group [ 1 ] >= numsets and len ( card_group ) > 1 : if card_group [ - 1 ] . number in wild_numbers : card_group [ - 1 ] . assignWild ( card_group [ - 2 ] . tempnumber + 1 ) elif card_group [ - 1 ] . number == 1 : card_group [ - 1 ] . assignWild ( 14 ) if card_group [ 0 ] . number in wild_numbers : card_group [ 0 ] . assignWild ( card_group [ 1 ] . tempnumber - 1 ) elif card_group [ 0 ] . number == 1 : card_group [ 0 ] . assignWild ( - 1 ) return cardgroup_dictionary
Convert scards to cards and assign values to Wild cards and Aces in runs from server.
Convert scards to cards and assign values to Wild cards and Aces in runs from server .
""" Convert scards to cards and assign values to Wild cards and Aces in runs from server.

    Needed to maintain integrity of Wilds' assigned values in runs.  Server does not know tempnumbers
    (for backwards compatability not changing json between server and client).
    There's no ambiguity except for wilds and Aces at the ends of the run (processRuns handles wilds in middle).
    """ # check if this is a run. # reset tempnumber for Wilds/Aces if they are at the end.
visible_scards_dictionary
wild_numbers
numsets