コード例 #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"))
コード例 #2
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"))
コード例 #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"))
コード例 #4
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"))
コード例 #5
0
 def get_cards_matrix(self, str_cards):
     cards = str_cards.split(" ")
     cards = map(CardUtils.getCard, cards)
     return CardUtils.get_matrix(cards)
コード例 #6
0
 def get_cards_matrix(self, str_cards):
     cards = str_cards.split(" ")
     cards = map(CardUtils.getCard, cards)
     return CardUtils.get_matrix(cards)