示例#1
0
文件: rules.py 项目: EssEf/Regnancy
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]
示例#2
0
文件: rules.py 项目: EssEf/Regnancy
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]