Content
if "discard" as args 0: if len(args) 2: Discards only the specified cards if specified cards are provided. Function also sets the hand post-discarding. GETS THE CARDS KEYS FROM THEIR DISPLAY NAMES BECAUSE THE USER CANNOT SEE THE KEYSIDS. DON'T TOUCH THIS. DON'T TOUCH THIS. keytuples (deckLoaded (1) ("name"), 1) for 1 in deckLoaded) DON'T TOUCH THIS. valid cardkeys ( DON'T TOUCH THIS for usersubstring in args 1:1: DON'T TOUCH THIS. tempcandidatekeys DON'T TOUCH THIS. for display name, cardkey in keytuples: DON'T TOUCH THIS. if usersubstring. lower() in displayname. lower(): DON'T TOUCH THIS. tempcandidatekeys.append (cardkey) DON'T TOUCH THIS nondupekeys DON'T TOUCH THIS. for 1 in tempcandidatekeys: DON'T TOUCH THIS. if (1 in cardhand) and (not (str(i) in valid card keys)): DON'T TOUCH THIS. nondupekeys.append (i) DON'T TOUCH THIS. if nondupekeys: DON'T TOUCH THIS. validcardkeys.append (nondupekeys 0) DON'T TOUCH THIS. DON'T TOUCH THIS. DON'T TOUCH THIS