def testDistributeOneCardsFromDeckTo3Stacks(self): stacks = [cards.StackOfCards(), cards.StackOfCards(), cards.StackOfCards()] cards.distributeCards(self.deck, stacks, 1) self.assertEquals(2, self.deck.height()) self.assertEquals(1, stacks[0].height()) self.assertEquals(1, stacks[1].height()) self.assertEquals(1, stacks[2].height())
def distributeCardsToAllPlayers(self, amount): cards.distributeCards(self.deck, self.playersCards.values(), amount)
def execute(self, round): round.deck.shuffle() round.distributeCardsToAllPlayers(11) cards.distributeCards(round.deck, round.deads, 11)
def testDistributeThreeCardsFromDeckTo2Stacks(self): stacks = [cards.StackOfCards(), cards.StackOfCards()] cards.distributeCards(self.deck, stacks, 3) self.assertEquals(0, self.deck.height()) self.assertEquals(3, stacks[0].height()) self.assertEquals(2, stacks[1].height())