Skip to content

Commit

Permalink
河底牌に対する大明槓が可能かどうか確認する.
Browse files Browse the repository at this point in the history
  • Loading branch information
shinkuan committed Aug 14, 2023
1 parent 1a95e86 commit 65c08a9
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions _kanachan.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down

0 comments on commit 65c08a9

Please sign in to comment.