Created
June 27, 2012 14:03
-
-
Save thelmuth/3004244 to your computer and use it in GitHub Desktop.
Dominion Favorite Card Sorter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
#f = open("DominionCardList.txt") | |
#cards = [] | |
#for line in f: | |
# cards.append(line[:-1]) | |
cards = ['Cellar', 'Chapel', 'Moat', 'Courtyard', 'Pawn', 'Secret Chamber', 'Embargo', 'Haven', 'Lighthouse', 'Native Village', 'Pearl Diver', 'Herbalist', 'Hamlet', 'Crossroads', 'Duchess', "Fool's Gold", 'Chancellor', 'Village', 'Woodcutter', 'Workshop', 'Great Hall', 'Masquerade', 'Shanty Town', 'Steward', 'Swindler', 'Wishing Well', 'Ambassador', 'Fishing Village', 'Lookout', 'Smugglers', 'Warehouse', 'Loan', 'Trade Route', 'Watchtower', 'Fortune Teller', 'Menagerie', 'Develop', 'Oasis', 'Oracle', 'Scheme', 'Tunnel', 'Black Market', 'Bureaucrat', 'Feast', 'Gardens', 'Militia', 'Moneylender', 'Remodel', 'Smithy', 'Spy', 'Thief', 'Throne Room', 'Baron', 'Bridge', 'Conspirator', 'Coppersmith', 'Ironworks', 'Mining Village', 'Scout', 'Caravan', 'Cutpurse', 'Island', 'Navigator', 'Pirate Ship', 'Salvager', 'Sea Hag', 'Treasure Map', 'Bishop', 'Monument', 'Quarry', 'Talisman', "Worker's Village", 'Farming Village', 'Horse Traders', 'Remake', 'Tournament', 'Young Witch', 'Jack of all Trades', 'Noble Brigand', 'Nomad Camp', 'Silk Road', 'Spice Merchant', 'Trader', 'Envoy', 'Walled Village', 'Council Room', 'Festival', 'Laboratory', 'Library', 'Market', 'Mine', 'Witch', 'Duke', 'Minion', 'Saboteur', 'Torturer', 'Trading Post', 'Tribute', 'Upgrade', 'Bazaar', 'Explorer', 'Ghost Ship', 'Merchant Ship', 'Outpost', 'Tactician', 'Treasury', 'Wharf', 'Apprentice', 'City', 'Contraband', 'Counting House', 'Mint', 'Mountebank', 'Rabble', 'Royal Seal', 'Vault', 'Venture', 'Harvest', 'Horn of Plenty', 'Hunting Party', 'Jester', 'Cache', 'Cartographer', 'Embassy', 'Haggler', 'Highway', 'Ill-Gotten Gains', 'Inn', 'Mandarin', 'Margrave', 'Stables', 'Governor', 'Stash', 'Adventurer', 'Harem', 'Nobles', 'Goons', 'Grand Market', 'Hoard', 'Fairgrounds', 'Border Village', 'Farmland', 'Bank', 'Expand', 'Forge', "King's Court", 'Peddler', 'Transmute', 'Vineyard', 'Apothecary', 'Scrying Pool', 'University', 'Alchemist', 'Familiar', "Philosopher's Stone", 'Golem', 'Possession'] | |
random.shuffle(cards) | |
# Comparator | |
def human_card_comparator(card1, card2): | |
print "If you like %s better, type 1." % card1 | |
print "If you like %s better, type 2." % card2 | |
choice = 'a' | |
while choice != '1' and choice != '2': | |
choice = raw_input("Choice: ") | |
if choice == '1': | |
return -1 | |
else: | |
return 1 | |
cards.sort(human_card_comparator) | |
for card in cards: | |
print card |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment