예제 #1
0
 def test_sendForward_Handequals25_At_FirstPlay(self):
     deck = cardDeck()
     share1, share2 = deck.serveCards()
     a = playerHand(share1)
     b = playerHand(share2)
     a.sendForward()
     self.assertEqual(len(share1), 25)
예제 #2
0
 def test_sendForward_entersCard_to_table(self):
     deck = cardDeck()
     share1, share2 = deck.serveCards()
     a = playerHand(share1)
     b = playerHand(share2)
     a.sendForward()
     self.assertNotEqual(len(share1), len(share2))
예제 #3
0
 def test_plunder_count_on_win_firstRound(self):
     deck = cardDeck()
     share1, share2 = deck.serveCards()
     a = playerHand(share1)
     b = playerHand(share2)
     a.plunder(('Z','ZZ'))
     self.assertEqual(len(share1), 27)
예제 #4
0
 def test_plunder_one(self):
     deck = cardDeck()
     share1, share2 = deck.serveCards()
     a = playerHand(share1)
     b = playerHand(share2)
     a.plunder(('Z','ZZ'))
     self.assertNotEqual(len(share1), len(share2))
예제 #5
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)
예제 #6
0
 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'))
예제 #7
0
 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)
예제 #8
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([]))
예제 #9
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)
예제 #10
0
 def test_shuffleHand_shuffles_current_hand(self): 
     deck = cardDeck()
     share1, share2 = deck.serveCards()
     hold = share1
     a = playerHand(share1)
     self.assertNotEqual(hold,a.shuffleHand())