本文整理汇总了Python中game.table.Table.count_of_remaining_tiles方法的典型用法代码示例。如果您正苦于以下问题:Python Table.count_of_remaining_tiles方法的具体用法?Python Table.count_of_remaining_tiles怎么用?Python Table.count_of_remaining_tiles使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类game.table.Table
的用法示例。
在下文中一共展示了Table.count_of_remaining_tiles方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_call_riichi_with_bad_wait_against_other_player_riichi
# 需要导入模块: from game.table import Table [as 别名]
# 或者: from game.table.Table import count_of_remaining_tiles [as 别名]
def test_call_riichi_with_bad_wait_against_other_player_riichi(self):
table = Table()
table.count_of_remaining_tiles = 60
table.player.scores = 25000
tiles = self._string_to_136_array(sou='11223', pin='234678', man='55')
table.player.init_hand(tiles)
table.player.draw_tile(self._string_to_136_tile(man='9'))
table.add_called_riichi(3)
discard = table.player.discard_tile()
self.assertEqual(self._to_string([discard]), '9m')
self.assertEqual(table.player.ai.in_defence, True)
self.assertEqual(table.player.can_call_riichi(), False)
示例2: test_dont_discard_safe_tiles_when_call_riichi
# 需要导入模块: from game.table import Table [as 别名]
# 或者: from game.table.Table import count_of_remaining_tiles [as 别名]
def test_dont_discard_safe_tiles_when_call_riichi(self):
table = Table()
table.count_of_remaining_tiles = 70
table.player.scores = 2000
tiles = self._string_to_136_array(sou='12356789', pin='22678')
table.player.init_hand(tiles)
table.player.draw_tile(self._string_to_136_tile(honors='1'))
table.player.discard_tile()
table.player.draw_tile(self._string_to_136_tile(honors='1'))
table.add_discarded_tile(1, self._string_to_136_tile(sou='1'), False)
table.add_called_riichi(1)
result = table.player.discard_tile()
self.assertEqual(table.player.can_call_riichi(), True)
self.assertEqual(self._to_string([result]), '1z')