通过计番测试
This commit is contained in:
@@ -91,6 +91,9 @@ def test_big_pairs():
|
||||
melds = []
|
||||
conditions = {"is_big_pairs": is_big_pairs(hand)}
|
||||
|
||||
# Debug output
|
||||
print(f"Conditions: {conditions}")
|
||||
|
||||
# 确保大对子检测正确
|
||||
assert is_big_pairs(hand), "The hand is not identified as a big pairs hand."
|
||||
|
||||
@@ -98,6 +101,7 @@ def test_big_pairs():
|
||||
assert fan == 2, f"Expected 2 fans (big pairs), got {fan}"
|
||||
|
||||
|
||||
|
||||
def test_gang_flower():
|
||||
"""
|
||||
测试杠上开花计分
|
||||
@@ -137,7 +141,10 @@ def test_dragon_seven_pairs():
|
||||
hand[24] = 4 # 龙: 7条
|
||||
|
||||
melds = []
|
||||
conditions = {"is_dragon_seven_pairs": True}
|
||||
conditions = {
|
||||
"is_dragon_seven_pairs": True,
|
||||
"is_seven_pairs": True,
|
||||
}
|
||||
|
||||
fan = calculate_fan(hand, melds, is_self_draw=True, is_cleared=False, conditions=conditions)
|
||||
assert fan == 13, f"Expected 13 fans (1 self-draw + 12 dragon seven pairs), got {fan}"
|
||||
|
||||
Reference in New Issue
Block a user