当前位置: 首页>>代码示例>>Python>>正文


Python Hand.find_lowest_combination方法代码示例

本文整理汇总了Python中hand.Hand.find_lowest_combination方法的典型用法代码示例。如果您正苦于以下问题:Python Hand.find_lowest_combination方法的具体用法?Python Hand.find_lowest_combination怎么用?Python Hand.find_lowest_combination使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在hand.Hand的用法示例。


在下文中一共展示了Hand.find_lowest_combination方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_find_straight_going_up

# 需要导入模块: from hand import Hand [as 别名]
# 或者: from hand.Hand import find_lowest_combination [as 别名]
    def test_find_straight_going_up(self):
        cards = ' 4_Sw, Phoenix, 5_Pa, 6_Pa, 7_Sw, 8_Pa'
        hand = Hand(cards_string=cards)

        combination = hand.find_lowest_combination(5, 'STRAIGHT')
        print(combination)
        self.assertIsNotNone(combination)

        combination = hand.find_lowest_combination(5, 'STRAIGHT', length=6)
        print(combination)
        self.assertIsNotNone(combination)
开发者ID:emmanuelameisen,项目名称:ticher,代码行数:13,代码来源:test_hand.py

示例2: test_find_straight_with_card_discard

# 需要导入模块: from hand import Hand [as 别名]
# 或者: from hand.Hand import find_lowest_combination [as 别名]
    def test_find_straight_with_card_discard(self):
        cards = ' 4_Sw, 6_Pa, 7_Sw, 8_Pa, 9_Sw, 10_Pa'
        hand = Hand(cards_string=cards)

        combination = hand.find_lowest_combination(3, 'STRAIGHT')
        print(combination)
        self.assertIsNotNone(combination)
开发者ID:emmanuelameisen,项目名称:ticher,代码行数:9,代码来源:test_hand.py

示例3: test_find_straight_with_phoenix

# 需要导入模块: from hand import Hand [as 别名]
# 或者: from hand.Hand import find_lowest_combination [as 别名]
    def test_find_straight_with_phoenix(self):
        cards = '2_Sw, 3_Pa, Phoenix, 5_Pa, 6_Pa'
        hand = Hand(cards_string=cards)

        combination = hand.find_lowest_combination(5, 'STRAIGHT')
        print(combination)
        self.assertIsNotNone(combination)
开发者ID:emmanuelameisen,项目名称:ticher,代码行数:9,代码来源:test_hand.py

示例4: test_find_squarebomb

# 需要导入模块: from hand import Hand [as 别名]
# 或者: from hand.Hand import find_lowest_combination [as 别名]
    def test_find_squarebomb(self):
        cards = 'Phoenix, 2_Pa, 3_Pa, 4_Pa, 5_Pa, 5_Sw, 5_Ja, 5_St'
        hand = Hand(cards_string=cards)

        combination = hand.find_lowest_combination(4, 'SQUAREBOMB')
        print(combination)
        self.assertIsNotNone(combination)
开发者ID:emmanuelameisen,项目名称:ticher,代码行数:9,代码来源:test_hand.py

示例5: test_find_straight

# 需要导入模块: from hand import Hand [as 别名]
# 或者: from hand.Hand import find_lowest_combination [as 别名]
    def test_find_straight(self):
        cards = '2_Sw, 3_Pa, 4_Pa, 5_Pa, 6_Pa, 5_Ja, 5_St'
        hand = Hand(cards_string=cards)

        combination = hand.find_lowest_combination(5, 'STRAIGHT')
        print(combination)
        self.assertIsNotNone(combination)
开发者ID:emmanuelameisen,项目名称:ticher,代码行数:9,代码来源:test_hand.py

示例6: test_find_low_pair_with_phoenix

# 需要导入模块: from hand import Hand [as 别名]
# 或者: from hand.Hand import find_lowest_combination [as 别名]
    def test_find_low_pair_with_phoenix(self):
        cards = 'Phoenix, 2_Pa, 3_Pa, 4_Pa, 5_Pa'
        hand = Hand(cards_string=cards)

        combination = hand.find_lowest_combination(1, 'PAIR')
        print(combination)
        self.assertTrue(combination.phoenix_flag)
开发者ID:emmanuelameisen,项目名称:ticher,代码行数:9,代码来源:test_hand.py

示例7: test_find_trio

# 需要导入模块: from hand import Hand [as 别名]
# 或者: from hand.Hand import find_lowest_combination [as 别名]
    def test_find_trio(self):
        cards = 'Phoenix, 2_Pa, 3_Pa, 4_Pa, 5_Pa, 5_Sw, 5_Ja, 5_St'
        hand = Hand(cards_string=cards)

        combination = hand.find_lowest_combination(4, 'TRIO')
        print(combination)
        self.assertIsNotNone(combination)
开发者ID:emmanuelameisen,项目名称:ticher,代码行数:9,代码来源:test_hand.py

示例8: test_steps_with_phoenix_not_need

# 需要导入模块: from hand import Hand [as 别名]
# 或者: from hand.Hand import find_lowest_combination [as 别名]
    def test_steps_with_phoenix_not_need(self):
        cards = '5_Sw, 5_Pa, 6_Sw, Phoenix, 7_Sw, 7_Pa, 8_Sw, 8_Pa'
        hand = Hand(cards_string=cards)

        combination = hand.find_lowest_combination(2, 'STEPS')
        print(combination)
        self.assertEqual(combination.type, 'STEPS')
开发者ID:emmanuelameisen,项目名称:ticher,代码行数:9,代码来源:test_hand.py

示例9: test_find_low_pair

# 需要导入模块: from hand import Hand [as 别名]
# 或者: from hand.Hand import find_lowest_combination [as 别名]
    def test_find_low_pair(self):
        cards = 'Phoenix, 2_Pa, 3_Pa, 4_Pa, 5_Pa, 5_Sw, 5_Ja, 5_St'
        hand = Hand(cards_string=cards)

        combination = hand.find_lowest_combination(1, 'PAIR')
        print(combination)
        self.assertFalse(combination.phoenix_flag)
开发者ID:emmanuelameisen,项目名称:ticher,代码行数:9,代码来源:test_hand.py

示例10: test_find_long_steps_with_phoenix

# 需要导入模块: from hand import Hand [as 别名]
# 或者: from hand.Hand import find_lowest_combination [as 别名]
    def test_find_long_steps_with_phoenix(self):
        cards = '5_Sw, 5_Pa, 6_Sw, 6_Pa, 7_Sw, Phoenix'
        hand = Hand(cards_string=cards)

        combination = hand.find_lowest_combination(2, 'STEPS', length=3)
        print(combination)
        self.assertEqual(combination.type, 'STEPS')
开发者ID:emmanuelameisen,项目名称:ticher,代码行数:9,代码来源:test_hand.py

示例11: test_find_steps

# 需要导入模块: from hand import Hand [as 别名]
# 或者: from hand.Hand import find_lowest_combination [as 别名]
    def test_find_steps(self):
        cards = '2_Sw, 2_Pa, 3_Sw,3_Pa'
        hand = Hand(cards_string=cards)

        combination = hand.find_lowest_combination(2, 'STEPS')
        print(combination)
        self.assertEqual(combination.type, 'STEPS')
开发者ID:emmanuelameisen,项目名称:ticher,代码行数:9,代码来源:test_hand.py

示例12: test_play_on_dragon

# 需要导入模块: from hand import Hand [as 别名]
# 或者: from hand.Hand import find_lowest_combination [as 别名]
    def test_play_on_dragon(self):
        cards = 'Phoenix'
        hand = Hand(cards_string=cards)

        print('DRAGON')
        combination = hand.find_lowest_combination(Dragon().power, 'SINGLE')
        print('DRAGON', combination)
        self.assertIsNotNone(combination)
开发者ID:emmanuelameisen,项目名称:ticher,代码行数:10,代码来源:test_hand.py

示例13: test_find_steps_no_solution_with_pairs

# 需要导入模块: from hand import Hand [as 别名]
# 或者: from hand.Hand import find_lowest_combination [as 别名]
    def test_find_steps_no_solution_with_pairs(self):
        cards = '6_Sw, 6_Pa'
        hand = Hand(cards_string=cards)

        combination = hand.find_lowest_combination(2, 'STEPS')

        print(combination)
        self.assertIsNone(combination)
开发者ID:emmanuelameisen,项目名称:ticher,代码行数:10,代码来源:test_hand.py

示例14: test_find_long_steps

# 需要导入模块: from hand import Hand [as 别名]
# 或者: from hand.Hand import find_lowest_combination [as 别名]
    def test_find_long_steps(self):
        cards = '5_Sw, 5_Pa, 6_Sw,6_Pa, 7_Sw, 7_Pa'
        hand = Hand(cards_string=cards)

        straight = hand.find_straight(hand, 2, 3)
        print(straight)

        combination = hand.find_lowest_combination(2, 'STEPS', 3)
        print(combination)
        self.assertEqual(combination.type, 'STEPS')
开发者ID:emmanuelameisen,项目名称:ticher,代码行数:12,代码来源:test_hand.py

示例15: test_stght

# 需要导入模块: from hand import Hand [as 别名]
# 或者: from hand.Hand import find_lowest_combination [as 别名]
    def test_stght(self):

        cards = 'Dog, Phoenix, Mahjong, 2_St, 3_Sw, 3_Pa,4_Pa,  5_St, 6_Sw, 6_Ja, 8_Pa, 9_Pa, J_Sw, K_Sw, A_Ja'
        hand = Hand(cards_string=cards)
        combination = hand.find_lowest_combination(0, 'STRAIGHT')
        self.assertEqual(combination.type, 'STRAIGHT')
开发者ID:emmanuelameisen,项目名称:ticher,代码行数:8,代码来源:test_hand.py


注:本文中的hand.Hand.find_lowest_combination方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。