def setUp(self):
        # Get player names
        self.player_names = testUtility.getPlayerNames()

        # number of curses and victory cards
        self.nV = testUtility.getnV(self.player_names)
        self.nC = testUtility.getnC(self.player_names)

        # Get box
        self.box = testUtility.getBoxes(self.nV)

        # Get supply order
        self.supply_order = testUtility.getSupplyOrder()

        # Pick 10 cards from box to be in the supply.
        self.boxlist = testUtility.getBoxList(self.box)
        self.random10 = testUtility.getRandom10(self.boxlist)
        self.supply = testUtility.getSupply(self.box, self.random10)

        # The supply always has these cards
        self.supply = testUtility.getDefaultSupply(self.supply,
                                                   self.player_names, self.nV,
                                                   self.nC)

        # initialize the trash
        self.trash = []

        # Construct the Player objects
        self.players = testUtility.getPlayers(self.player_names)

        # Instantiate player
        self.player = Dominion.Player('Annie')
    def setUp(self):
        self.player_name = testUtility.getPlayerNames()
        self.nC = testUtility.getNumberCurse(self.player_name)
        self.nV = testUtility.getNumberVictory(self.player_name)
        self.box = testUtility.getBoxes(self.nV)
        self.supply_order = testUtility.getSupplyOrder()

        # pick cards from box to be in supply
        self.supply = testUtility.getSupply(self.box, self.player_name, self.nV, self.nC)
        self.trash = []
        self.player = Dominion.Player('Annie')
    def setUp(self):
        #Data Setup
        self.player_names = ["Annie","*Ben","*Carla"]
        self.players = testUtility.getPlayers(self.player_names)
        self.nV = testUtility.numVic(self.players)
        self.nC = testUtility.getCurses(self.players)
        self.box = testUtility.getBoxes(self.nV)
        self.supply_order = testUtility.getSupplyOrder()

        self.supply = testUtility.getSupply(self.box)
        testUtility.setSupply(self.supply, self.players, self.nV, self.nC)
        self.trash = []
        self.player = Dominion.Player('Annie')
Esempio n. 4
0
    def setUp(self):
        # Data setup
        # Get player names
        self.player_names = testUtility.getPlayerNames()

        # number of curses and victory cards
        self.nV = testUtility.getNumberOfVictoryCards(self.player_names)
        self.nC = testUtility.getNumberOfCurseCards(self.player_names)

        # Define box
        self.box = testUtility.getBoxes(self.nV)

        self.supply_order = testUtility.getSupplyOrder()

        # Pick 10 random cards from box to be in the supply, then add the cards that are included in every game.
        self.supply = testUtility.getSupplyCards(self.box, self.player_names,
                                                 self.nV, self.nC)

        # initialize the trash
        self.trash = testUtility.initializeTrash()
Esempio n. 5
0
# Get player names
player_names = testUtility.getPlayerNames()

# number of curses and victory cards
nV = testUtility.getNumVictoryCards(player_names)
nC = testUtility.getNumCurses(player_names)

# Define box
box = testUtility.defineBox(nV)

# DATA BUG: swapping Throne Room and Thief cards
box["Thief"]=[Dominion.Throne_Room()]*10
box["Throne Room"]=[Dominion.Thief()]*10

# initialize supply_order
supply_order = testUtility.getSupplyOrder()

# Pick 10 cards from box to be in the supply.
supply = testUtility.pickBoxCards(box)

# The supply always has these cards.
testUtility.addStandardSupplyCards(supply, supply_order, nV, nC)

# Construct the Player objects
players = testUtility.makePlayers(player_names)

# Play the game
testUtility.playGame(supply, supply_order, players)
            
# Final score
testUtility.getFinalScore(players)
Esempio n. 6
0
@author: dwiens
"""

import Dominion
import testUtility as tU

# Get player names (and count)
player_names = tU.getPlayerNames()

# number of curses and victory cards
nV = tU.getNumberOfVictoryCards(len(player_names))
nC = tU.getNumberOfCurses(len(player_names))

# Define box and supply
box = tU.getFullBox(nV)
supply_order = tU.getSupplyOrder()
supply = tU.getSupplyFromBox(box, len(player_names), nV, nC)

# initialize the trash
trash = []

# Construct the Player objects
players = tU.getPlayers(player_names)

#########################
# TEST SCENARIO 1

supply["Province"] = []

#########################