示例#1
0
    def test_valid_suites(self):
        self.assertEquals(CardUtils.getCard("2c"), Card("2", "C"))
        self.assertEquals(CardUtils.getCard("2C"), Card("2", "C"))

        self.assertEquals(CardUtils.getCard("2D"), Card("2", "D"))
        self.assertEquals(CardUtils.getCard("2d"), Card("2", "D"))

        self.assertEquals(CardUtils.getCard("2h"), Card("2", "H"))

        self.assertEquals(CardUtils.getCard("2S"), Card("2", "S"))
    def test_valid_suites(self):
        self.assertEquals(CardUtils.getCard("2c"), Card("2", "C"))
        self.assertEquals(CardUtils.getCard("2C"), Card("2", "C"))
        
        self.assertEquals(CardUtils.getCard("2D"), Card("2", "D"))
        self.assertEquals(CardUtils.getCard("2d"), Card("2", "D"))

        self.assertEquals(CardUtils.getCard("2h"), Card("2", "H"))
        
        self.assertEquals(CardUtils.getCard("2S"), Card("2", "S"))
示例#3
0
 def test_valid_cards(self):
     self.assertEquals(CardUtils.getCard("2s"), Card("2", "S"))
     self.assertEquals(CardUtils.getCard("ah"), Card("A", "H"))
     self.assertEquals(CardUtils.getCard("aH"), Card("A", "H"))
     self.assertEquals(CardUtils.getCard("AH"), Card("A", "H"))
     self.assertEquals(CardUtils.getCard("KD"), Card("K", "D"))
 def test_valid_cards(self):
     self.assertEquals(CardUtils.getCard("2s"), Card("2", "S"))
     self.assertEquals(CardUtils.getCard("ah"), Card("A", "H"))
     self.assertEquals(CardUtils.getCard("aH"), Card("A", "H"))
     self.assertEquals(CardUtils.getCard("AH"), Card("A", "H"))
     self.assertEquals(CardUtils.getCard("KD"), Card("K", "D"))
示例#5
0
 def get_cards_matrix(self, str_cards):
     cards = str_cards.split(" ")
     cards = map(CardUtils.getCard, cards)
     return CardUtils.get_matrix(cards)
 def get_cards_matrix(self, str_cards):
     cards = str_cards.split(" ")
     cards = map(CardUtils.getCard, cards)
     return CardUtils.get_matrix(cards)