import testUtility import random from collections import defaultdict # Get player names player_names = ["Annie", "*Ben", "*Carla"] # Set number of curses and victory cards nV, nC = testUtility.set_vc_number(player_names) # Define box and supply_order box, supply_order = testUtility.define_box(nV) # Choose and set supply cards supply = testUtility.set_supply(box, player_names, nV, nC) # Initialize the trash trash = [] # Test silver and gold = 0 supply["Copper"] = [Dominion.Copper()] * (60 - len(player_names) * 7) supply["Silver"] = [Dominion.Silver()] * 0 supply["Gold"] = [Dominion.Gold()] * 0 # Construct the Player objects players = testUtility.set_players(player_names) # Play the game testUtility.play_game(supply, supply_order, players, trash) # Final score testUtility.display_game_results(players)
nV, nC = testUtility.get_nV_nC(player_names) #Define box box = testUtility.get_box(nV) supply_order = testUtility.get_supply_order() #Pick 10 cards from box to be in the supply. boxlist = [k for k in box] random.shuffle(boxlist) random10 = boxlist[:10] supply = defaultdict(list, [(k, box[k]) for k in random10]) #The supply always has these cards supply = testUtility.get_supply(supply, nV, nC, player_names) #Costruct the Player objects players = testUtility.get_players(player_names) #initialize the trash trash = [] #initialize turn number turn = 0 #Play the game testUtility.play_game(trash, turn, supply, supply_order, players) #Announce Final score and Winners testUtility.get_final_score(players)