Ejemplo n.º 1
0
 def test(self):
     factory = models.create_basic_factory()
     cooper_class = factory['Cooper']
     cards = models.generate_cards(cooper_class, 2)
     self.assertEqual(cards[0].card_class, cooper_class)
     self.assertEqual(cards[1].card_class, cooper_class)
     self.assertTrue(cards[0] != cards[1])
Ejemplo n.º 2
0
    def test1(self):
        supply = models.Supply()
        cooper_pile = models.CardPile(models.generate_cards(self.cooper_class, 60))
        supply.add_pile(cooper_pile)

        self.assertTrue(self.cooper_class in supply)
        self.assertTrue(self.silver_class not in supply)
        self.assertEqual({self.cooper_class: cooper_pile}, supply.piles)
Ejemplo n.º 3
0
def main():
    factory = models.create_basic_factory()

    player = models.Player("atty303")

    supply = models.Supply()
    supply.add_pile(models.CardPile(models.generate_cards(factory["Cooper"], 60)))
    supply.add_pile(models.CardPile(models.generate_cards(factory["Silver"], 40)))
    supply.add_pile(models.CardPile(models.generate_cards(factory["Gold"], 30)))

    game = models.Game(players=[player], supply=supply)

    dump_supply(game.supply)

    player.deck.add_top(models.generate_cards(factory["Cooper"], 7))
    player.deck.add_top(models.generate_cards(factory["Estate"], 3))
    player.deck.shuffle()

    player.draw_card(5)

    dump_player(player)
Ejemplo n.º 4
0
 def add_cooper_to_pile():
     copper_pile = models.CardPile(models.generate_cards(self.cooper_class, 60))
     supply.add_pile(copper_pile)