Ejemplo n.º 1
0
def randomsetup():

    def card_filter(c):
        return not c in commonpiles and not c in [BagOfGold, Diadem,
                Followers, Princess, TrustySteed]

    cards = [c for c in cardprovider.get_all_card_classes() if card_filter(c)]
    random.shuffle(cards)
    if global_options.debug_mode:
        d =[]# [IllGottenGains, FoolsGold]
        d.extend(cards[:10-len(d)])
        return d
    else:
        return cards[:10]
Ejemplo n.º 2
0
def get_setup(setup):
    if setup == 'random':
        return randomsetup()
    else:
        deck = deckprovider.load_deck(setup)
        return [c for c in cardprovider.get_all_card_classes() if c.name in deck]