Exemplo n.º 1
0
    def setUp(self):
        # Get player names
        self.player_names = ["*Ryan", "*Janie"]

        # number of curses and victory cards
        if len(self.player_names) > 2:
            self.nV = 12
        else:
            self.nV = 8
        self.nC = -10 + 10 * len(self.player_names)

        self.box = testUtility.GetBoxes(self.nV)

        # Pick 10 cards from box to be in the supply.
        self.supply = testUtility.pickCards(self.box, self.player_names,
                                            self.nV, self.nC)

        # initialize the trash
        self.trash = []

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

        # Final score
        testUtility.finalScore([Dominion.Player(self.players)])
Exemplo n.º 2
0
def main():
    #Get player names
    player_names = ["Annie", "*Ben", "*Carla"]

    # Number of curses and victory cards
    if len(player_names) > 2:
        nV = 12
    else:
        nV = 8
    nC = -10 + 10 * len(player_names)

    # Costruct the Player objects
    players = testUtility.createPlayers(player_names)

    # Create the box
    box = testUtility.getBoxes(nV)

    # Establish supply with 10 cards
    supply = testUtility.establishSupply(box, nC, nV, player_names)

    # Play Dominion
    testUtility.play(supply, players)

    # Show final score
    testUtility.finalScore(players)
Exemplo n.º 3
0
import random
import testUtility
from collections import defaultdict

#Get player names
player_names = ["*Ryan"]

#number of curses and victory cards
if len(player_names) > 2:
    nV = 12
else:
    nV = 8
nC = -10 + 10 * len(player_names)

box = testUtility.GetBoxes(nV)

#Pick 10 cards from box to be in the supply.
supply = testUtility.pickCards(box, player_names, nV, nC)

#initialize the trash
trash = []

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

#Play the game
testUtility.playGame(supply, players, trash)

#Final score
testUtility.finalScore(players)
Exemplo n.º 4
0
from collections import defaultdict

#Get player names
player_names = ["*Ryan", "*Bill"]

#number of curses and victory cards
if len(player_names)>2:
    nV=12
else:
    nV=8
nC = -10 + 10 * len(player_names)


box = testUtility.GetBoxes(nV)

#Pick 10 cards from box to be in the supply.
supply = testUtility.pickCards(box, player_names, nV, nC)

#initialize the trash
trash = []

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

#Play the game
testUtility.playGame(supply, players,trash)
            

#Final score
testUtility.finalScore([Dominion.Player("Ryan")])