Exemplo n.º 1
0
    def isFlowerHu(self, tiles):
        """
        花胡:摸到花牌8张全
        """
        handTile = tiles[MHand.TYPE_HAND]
        flowerTile = tiles[MHand.TYPE_SHOW_FLOWERS]

        flower_count = 0
        for tile in handTile:
            if MTile.isFlower(tile):
                flower_count += 1
        if flower_count + len(flowerTile) == 8:
            return True, [handTile]

        return False, []
Exemplo n.º 2
0
 def isFlower(self, tile):
     """判断tile是否花牌"""
     return MTile.isFlower(tile)