From 65c08a97b7aa332a6043b5acce498fdc798f7448 Mon Sep 17 00:00:00 2001 From: shinkuan Date: Mon, 14 Aug 2023 08:21:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B2=B3=E5=BA=95=E7=89=8C=E3=81=AB=E5=AF=BE?= =?UTF-8?q?=E3=81=99=E3=82=8B=E5=A4=A7=E6=98=8E=E6=A7=93=E3=81=8C=E5=8F=AF?= =?UTF-8?q?=E8=83=BD=E3=81=8B=E3=81=A9=E3=81=86=E3=81=8B=E7=A2=BA=E8=AA=8D?= =?UTF-8?q?=E3=81=99=E3=82=8B=EF=BC=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _kanachan.py | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/_kanachan.py b/_kanachan.py index 107e7da..ee45e85 100644 --- a/_kanachan.py +++ b/_kanachan.py @@ -1052,18 +1052,19 @@ def on_dapai( if not self.__my_liqi: # 大明槓ができるかどうかチェックする. - # TODO: 河底牌に対する大明槓が可能かどうか確認する. - for t, consumed_counts in enumerate(_DAMINGGANG_COUNTS): - if tile != t: - continue - flag = True - for k, v in consumed_counts.items(): - if hand_counts[k] < v: - flag = False - break - if flag: - candidates.append(432 + relseat * 37 + t) - skippable = True + # 河底牌に対する大明槓が可能かどうか確認する. + if self.__num_left_tiles > 0: + for t, consumed_counts in enumerate(_DAMINGGANG_COUNTS): + if tile != t: + continue + flag = True + for k, v in consumed_counts.items(): + if hand_counts[k] < v: + flag = False + break + if flag: + candidates.append(432 + relseat * 37 + t) + skippable = True combined_hand = self.__my_hand + [tile]