text: # coding=utf-8
  import time
  
  from service.mahjong.models.hutype.basetype import BaseType
  from service.mahjong.constants.carddefine import CardType, CARD_SIZE
  from service.mahjong.models.card.hand_card import HandCard
  from service.mahjong.models.card.card import Card
  from service.mahjong.models.utils.cardanalyse import CardAnalyse
  
  
  class ShuangAnGang(BaseType):
      """
      5)	双暗杠：胡牌时，牌里有2副暗杠。
      不记番：双暗刻
      """
  
      def __init__(self):
          super(ShuangAnGang, self).__init__()
  
      def is_this_type(self, hand_card, card_analyse):
          return len(hand_card.an_gang_card_vals) == 2
  
  
  
  if __name__ == "__main__":
      pass
      card_analyse = CardAnalyse()
      hand_card = HandCard(0)
      # hand_card.hand_card_info = {
      #     1: [9, 1, 1, 1, 1, 1, 1, 1, 1, 1],  # 万
      #     2: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],  # 条
      #     3: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],  # 饼
      #     4: [2, 2, 0, 0, 0],                 # 风
      #     5: [3, 3, 0, 0],                    # 箭
      # }
      hand_card.hand_card_info = {
          1: [14, 4, 4, 4, 0, 0, 0, 0, 0, 2],  # 万
          2: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],  # 条
          3: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],  # 饼
          4: [0, 0, 0, 0, 0],                 # 风
          5: [0, 0, 0, 0],                    # 箭
  
      }
      hand_card.handle_hand_card_for_settle_show()
      hand_card.union_hand_card()
      print("hand_card =", hand_card.hand_card_vals)
      test_type = ShuangAnGang()
      start_time = time.time()
      print(test_type.is_this_type(hand_card, card_analyse))
      print("time = ", time.time() - start_time)