Exemplo n.º 1
0
 def setUp(self):
     #setup empty trash pile
     self.trash = []
     #setup players
     self.players = testUtility.GetPlayerNames()
     #setup victory cards
     self.nV = testUtility.GetNumVictoryCards(self.players)
     #setup curse cards
     self.nC = testUtility.GetNumCursesCards(self.players)
     #create the box of cards
     self.box = testUtility.GetBoxes(self.nV)
     #get the supply order
     self.supply_order = testUtility.GetSupplyOrder()
     # Pick n cards from box to be in the supply
     self.supply = testUtility.pick10CardsToBeInSupply(self.box)
     #update supply with all the victory and curse guards based
     #on the players
     testUtility.updateSupply(self.supply, self.players, self.nV, self.nC)
     #make current player annnie
     self.player = Dominion.Player("Annie")
Exemplo n.º 2
0
# -*- coding: utf-8 -*-
"""
Created on Sat Jan 18 2015

@author: huynhant
"""

import Dominion
import random
from collections import defaultdict
import testUtility

# Get player names
player_names = testUtility.GetPlayerNames()

# number of curses and victory cards
nV = testUtility.GetNV(player_names)
nC = -10 + 10 * len(player_names)

# get box
box = testUtility.GetBoxes(nV)

# get supply order
supply_order = testUtility.GetSupplyOrder()

# Pick 10 cards from box to be in the supply.
boxlist = [k for k in box]
random.shuffle(boxlist)

# game will only have one card from box to be in the supply
random10 = boxlist[:1]