示例#1
0
def initBox(nV):
#Define box
    box = {}
    box["Woodcutter"]=[Dominion.Woodcutter()]*10
    box["Smithy"]=[Dominion.Smithy()]*10
    box["Laboratory"]=[Dominion.Laboratory()]*10
    box["Village"]=[Dominion.Village()]*10
    box["Festival"]=[Dominion.Festival()]*10
    box["Market"]=[Dominion.Market()]*10
    box["Chancellor"]=[Dominion.Chancellor()]*10
    box["Workshop"]=[Dominion.Workshop()]*10
    box["Moneylender"]=[Dominion.Moneylender()]*10
    box["Chapel"]=[Dominion.Chapel()]*10
    box["Cellar"]=[Dominion.Cellar()]*10
    box["Remodel"]=[Dominion.Remodel()]*10
    box["Adventurer"]=[Dominion.Adventurer()]*10
    box["Feast"]=[Dominion.Feast()]*10
    box["Mine"]=[Dominion.Mine()]*10
    box["Library"]=[Dominion.Library()]*10
    box["Gardens"]=[Dominion.Gardens()]*nV
    box["Moat"]=[Dominion.Moat()]*10
    box["Council Room"]=[Dominion.Council_Room()]*10
    box["Witch"]=[Dominion.Witch()]*10
    box["Bureaucrat"]=[Dominion.Bureaucrat()]*10
    box["Militia"]=[Dominion.Militia()]*10
    box["Spy"]=[Dominion.Spy()]*10
    box["Thief"]=[Dominion.Thief()]*10
    box["Throne Room"]=[Dominion.Throne_Room()]*10

    return box
示例#2
0
def get_box(num_victory):
  """
  Input: the number of victory cards
  Returns: a dictionary of cards
  The number of "Gardens" is determined by the # of victory cards
  """
  box = {}
  box["Woodcutter"] = [Dominion.Woodcutter()] * 10
  box["Smithy"] = [Dominion.Smithy()] * 10
  box["Laboratory"] = [Dominion.Laboratory()] * 10
  box["Village"] = [Dominion.Village()] * 10
  box["Festival"] = [Dominion.Festival()] * 10
  box["Market"] = [Dominion.Market()] * 10
  box["Chancellor"] = [Dominion.Chancellor()] * 10
  box["Workshop"] = [Dominion.Workshop()] * 10
  box["Moneylender"] = [Dominion.Moneylender()] * 10
  box["Chapel"] = [Dominion.Chapel()] * 10
  box["Cellar"] = [Dominion.Cellar()] * 10
  box["Remodel"] = [Dominion.Remodel()] * 10
  box["Adventurer"] = [Dominion.Adventurer()] * 10
  box["Feast"] = [Dominion.Feast()] * 10
  box["Mine"] = [Dominion.Mine()] * 10
  box["Library"] = [Dominion.Library()] * 10
  box["Gardens"] = [Dominion.Gardens()] * num_victory
  box["Moat"] = [Dominion.Moat()] * 10
  box["Council Room"] = [Dominion.Council_Room()] * 10
  box["Witch"] = [Dominion.Witch()] * 10
  box["Bureaucrat"] = [Dominion.Bureaucrat()] * 10
  box["Militia"] = [Dominion.Militia()] * 10
  box["Spy"] = [Dominion.Spy()] * 10
  box["Thief"] = [Dominion.Thief()] * 10
  box["Throne Room"] = [Dominion.Throne_Room()] * 10
  return box
示例#3
0
def get_boxes(nV):
    """
    :param nV: starting number of each victory card, used here
    for calculating number of garden cards
    :return: box, a dictionary containing starting lists of action cards
    """
    box = {}
    box["Woodcutter"] = [Dominion.Woodcutter()] * 10
    box["Smithy"] = [Dominion.Smithy()] * 10
    box["Laboratory"] = [Dominion.Laboratory()] * 10
    box["Village"] = [Dominion.Village()] * 10
    box["Festival"] = [Dominion.Festival()] * 10
    box["Market"] = [Dominion.Market()] * 10
    box["Chancellor"] = [Dominion.Chancellor()] * 10
    box["Workshop"] = [Dominion.Workshop()] * 10
    box["Moneylender"] = [Dominion.Moneylender()] * 10
    box["Chapel"] = [Dominion.Chapel()] * 10
    box["Cellar"] = [Dominion.Cellar()] * 10
    box["Remodel"] = [Dominion.Remodel()] * 10
    box["Adventurer"] = [Dominion.Adventurer()] * 10
    box["Feast"] = [Dominion.Feast()] * 10
    box["Mine"] = [Dominion.Mine()] * 10
    box["Library"] = [Dominion.Library()] * 10
    box["Gardens"] = [Dominion.Gardens()] * nV
    box["Moat"] = [Dominion.Moat()] * 10
    box["Council Room"] = [Dominion.Council_Room()] * 10
    box["Witch"] = [Dominion.Witch()] * 10
    box["Bureaucrat"] = [Dominion.Bureaucrat()] * 10
    box["Militia"] = [Dominion.Militia()] * 10
    box["Spy"] = [Dominion.Spy()] * 10
    box["Thief"] = [Dominion.Thief()] * 10
    box["Throne Room"] = [Dominion.Throne_Room()] * 10

    return box
示例#4
0
def define_box(nV):
    box = {}
    box["Woodcutter"]=[Dominion.Woodcutter()]*10
    box["Smithy"]=[Dominion.Smithy()]*10
    box["Laboratory"]=[Dominion.Laboratory()]*10
    box["Village"]=[Dominion.Village()]*10
    box["Festival"]=[Dominion.Festival()]*10
    box["Market"]=[Dominion.Market()]*10
    box["Chancellor"]=[Dominion.Chancellor()]*10
    box["Workshop"]=[Dominion.Workshop()]*10
    box["Moneylender"]=[Dominion.Moneylender()]*10
    box["Chapel"]=[Dominion.Chapel()]*10
    box["Cellar"]=[Dominion.Cellar()]*10
    box["Remodel"]=[Dominion.Remodel()]*10
    box["Adventurer"]=[Dominion.Adventurer()]*10
    box["Feast"]=[Dominion.Feast()]*10
    box["Mine"]=[Dominion.Mine()]*10
    box["Library"]=[Dominion.Library()]*10
    box["Gardens"]=[Dominion.Gardens()]*nV
    box["Moat"]=[Dominion.Moat()]*10
    box["Council Room"]=[Dominion.Council_Room()]*10
    box["Witch"]=[Dominion.Witch()]*10
    box["Bureaucrat"]=[Dominion.Bureaucrat()]*10
    box["Militia"]=[Dominion.Militia()]*10
    box["Spy"]=[Dominion.Spy()]*10
    box["Thief"]=[Dominion.Thief()]*10
    box["Throne Room"]=[Dominion.Throne_Room()]*10

    supply_order = {0: ['Curse', 'Copper'], 2: ['Estate', 'Cellar', 'Chapel', 'Moat'],
                    3: ['Silver', 'Chancellor', 'Village', 'Woodcutter', 'Workshop'],
                    4: ['Gardens', 'Bureaucrat', 'Feast', 'Militia', 'Moneylender', 'Remodel', 'Smithy', 'Spy', 'Thief',
                        'Throne Room'],
                    5: ['Duchy', 'Market', 'Council Room', 'Festival', 'Laboratory', 'Library', 'Mine', 'Witch'],
                    6: ['Gold', 'Adventurer'], 8: ['Province']}
    return box, supply_order
示例#5
0
def getBoxes(nV):
    """
    Returns a box object
    takes nV as an argument that represents 
    the number of Victory Cards in play
    """

    #Create a box object
    box = {}
    box["Woodcutter"] = [Dominion.Woodcutter()] * 10
    box["Smithy"] = [Dominion.Smithy()] * 10
    box["Laboratory"] = [Dominion.Laboratory()] * 10
    box["Village"] = [Dominion.Village()] * 10
    box["Festival"] = [Dominion.Festival()] * 10
    box["Market"] = [Dominion.Market()] * 10
    box["Chancellor"] = [Dominion.Chancellor()] * 10
    box["Workshop"] = [Dominion.Workshop()] * 10
    box["Moneylender"] = [Dominion.Moneylender()] * 10
    box["Chapel"] = [Dominion.Chapel()] * 10
    box["Cellar"] = [Dominion.Cellar()] * 10
    box["Remodel"] = [Dominion.Remodel()] * 10
    box["Adventurer"] = [Dominion.Adventurer()] * 10
    box["Feast"] = [Dominion.Feast()] * 10
    box["Mine"] = [Dominion.Mine()] * 10
    box["Library"] = [Dominion.Library()] * 10
    box["Gardens"] = [Dominion.Gardens()] * nV
    box["Moat"] = [Dominion.Moat()] * 10
    box["Council Room"] = [Dominion.Council_Room()] * 10
    box["Witch"] = [Dominion.Witch()] * 10
    box["Bureaucrat"] = [Dominion.Bureaucrat()] * 10
    box["Militia"] = [Dominion.Militia()] * 10
    box["Spy"] = [Dominion.Spy()] * 10
    box["Thief"] = [Dominion.Thief()] * 10
    box["Throne Room"] = [Dominion.Throne_Room()] * 10

    return box
示例#6
0
else:
    nV = 8
nC = -10 + 10 * len(player_names)

#Define box
box = {}
box["Woodcutter"] = [Dominion.Woodcutter()] * 10
box["Smithy"] = [Dominion.Smithy()] * 10
box["Laboratory"] = [Dominion.Laboratory()] * 10
box["Village"] = [Dominion.Village()] * 10
box["Festival"] = [Dominion.Festival()] * 10
box["Market"] = [Dominion.Market()] * 10
box["Chancellor"] = [Dominion.Chancellor()] * 10
box["Workshop"] = [Dominion.Workshop()] * 10
box["Moneylender"] = [Dominion.Moneylender()] * 10
box["Chapel"] = [Dominion.Chapel()] * 10
box["Cellar"] = [Dominion.Cellar()] * 10
box["Remodel"] = [Dominion.Remodel()] * 10
box["Adventurer"] = [Dominion.Adventurer()] * 10
box["Feast"] = [Dominion.Feast()] * 10
box["Mine"] = [Dominion.Mine()] * 10
box["Library"] = [Dominion.Library()] * 10
box["Gardens"] = [Dominion.Gardens()] * nV
box["Moat"] = [Dominion.Moat()] * 10
box["Council Room"] = [Dominion.Council_Room()] * 10
box["Witch"] = [Dominion.Witch()] * 10
box["Bureaucrat"] = [Dominion.Bureaucrat()] * 10
box["Militia"] = [Dominion.Militia()] * 10
box["Spy"] = [Dominion.Spy()] * 10
box["Thief"] = [Dominion.Thief()] * 10
box["Throne Room"] = [Dominion.Throne_Room()] * 10
示例#7
0
supply_order = {
    0: ['Curse', 'Copper'],
    2: ['Estate', 'Cellar', 'Chapel', 'Moat'],
    3: ['Silver', 'Chancellor', 'Village', 'Woodcutter', 'Workshop'],
    4: [
        'Gardens', 'Bureaucrat', 'Feast', 'Militia', 'Moneylender', 'Remodel',
        'Smithy', 'Spy', 'Thief', 'Throne Room'
    ],
    5: [
        'Duchy', 'Market', 'Council Room', 'Festival', 'Laboratory', 'Library',
        'Mine', 'Witch'
    ],
    6: ['Gold', 'Adventurer'],
    8: ['Province']
}

nC, nV = refactor.numCursesVictory(player_names)

#Define box
box = {}
supply = refactor.getSupply(nV, box)
supply["Chapel"] = [Dominion.Chapel()] * 1

refactor.addSupplyStandard(supply, player_names, nV, nC)

trash, players = refactor.initializeGame(player_names)

refactor.playGame(supply_order, players, supply, trash)

refactor.calcFinalScore(players)
示例#8
0
nC = testUtility.getnC(player_names)

# Get box
box = testUtility.getBoxes(nV)

# TEST SCENARIO BUG 1 -- MIX UP THE CARDS
box["Smithy"] = [Dominion.Woodcutter()] * 10
box["Laboratory"] = [Dominion.Smithy()] * 10
box["Village"] = [Dominion.Laboratory()] * 10
box["Festival"] = [Dominion.Village()] * 10
box["Market"] = [Dominion.Festival()] * 10
box["Chancellor"] = [Dominion.Market()] * 10
box["Workshop"] = [Dominion.Chancellor()] * 10
box["Moneylender"] = [Dominion.Workshop()] * 10
box["Chapel"] = [Dominion.Moneylender()] * 10
box["Cellar"] = [Dominion.Chapel()] * 10
box["Remodel"] = [Dominion.Cellar()] * 10
box["Adventurer"] = [Dominion.Remodel()] * 10
box["Feast"] = [Dominion.Adventurer()] * 10
box["Mine"] = [Dominion.Feast()] * 10
box["Library"] = [Dominion.Mine()] * 10
box["Gardens"] = [Dominion.Library()] * 10
box["Moat"] = [Dominion.Gardens()] * nV
box["Council Room"] = [Dominion.Moat()] * 10
box["Witch"] = [Dominion.Council_Room()] * 10
box["Bureaucrat"] = [Dominion.Witch()] * 10
box["Militia"] = [Dominion.Bureaucrat()] * 10
box["Spy"] = [Dominion.Militia()] * 10
box["Thief"] = [Dominion.Spy()] * 10
box["Throne Room"] = [Dominion.Thief()] * 10