def test_reinforce_return_2_CardsWhenHasMoreThan2Cards_During_War(self): deck = cardDeck() share1, share2 = deck.serveCards() a = playerHand(share1) soldier = Warriors('Vikram',a) hold = soldier.reinforce() self.assertEqual(len(hold), 2)
def test_standingArmy_NotTrue(self): deck = cardDeck() share1, share2 = deck.serveCards() a = playerHand(share1) soldier = Warriors('Vikram',a) soldier.player.hand = [] self.assertFalse(soldier.standingArmy()>1)
def test_enterNegotiations_firstRound(self): deck = cardDeck() share1, share2 = deck.serveCards() a = playerHand(share1) soldier = Warriors('Vikram',a) aa = soldier.enterNegotiations() self.assertEqual(aa, ('D', 'A'))
def test_reinforce_returns_emptyList_when0cardsOnHand_During_War(self): deck = cardDeck() share1, share2 = deck.serveCards() a = playerHand(share1) soldier = Warriors('Vikram',a) soldier.player.hand = [] hold = soldier.reinforce() self.assertEqual(len(hold), len([]))
def test_reinforce_return_emptyListWhen1cardOnHand_During_War(self): deck = cardDeck() share1, share2 = deck.serveCards() a = playerHand(share1) soldier = Warriors('Vikram',a) soldier.player.hand = [] soldier.player.hand.append(('H','A')) hold = soldier.reinforce() self.assertEqual(len(hold), 0)