예제 #1
0
 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)
예제 #2
0
 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([]))
예제 #3
0
 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)