Exemplo n.º 1
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.º 2
0
box = testUtility.getBox(nV)

supply_order = testUtility.getOrder()

# pick 10 cards from box to be in supply
supply = testUtility.pick10(box)

# add default cards to supply
testUtility.addDefaultSupplyCards(supply, nV, nC, player_names)

# initialize the trash
trash = []

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

###############################
# BUG
# (repeated call will assign 2x the player in the game.
###############################
testUtility.createPlayers(players, player_names)

# Play the game
turn = 0
while not Dominion.gameover(supply):
    turn += 1
    print("\r")
    for value in supply_order:
        print(value)
        for stack in supply_order[value]: