Ejemplo 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)])
Ejemplo n.º 2
0
import Dominion
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)