[verified] fix: wildcard count correction in CheckWin tile count check
根因: CheckWin 开头 tiles.Count != 14 检查未计入 wildcardCount, 导致 12 tiles + 2 wildcards = 14 被误判为手牌不足。 修复: tiles.Count + wildcardCount != 14 同步修正鬼牌_1wildcard补刻子测试用13 tiles + 1 wildcard = 14 测试: 33/33 全部通过
This commit is contained in:
@ -179,8 +179,9 @@ public class MeldsSolverTests
|
||||
[Fact]
|
||||
public void 鬼牌_1wildcard补刻子_ShouldWin()
|
||||
{
|
||||
// 111万 234万 567万 11条 99条 + 1 wildcard to complete 111条kezi
|
||||
var hand = new List<int> { 1, 1, 1, 2, 3, 4, 5, 6, 7, 11, 12, 13, 19, 19 };
|
||||
// 111万 234万 567万 (3 melds) + 条11,条11 + wildcard = 刻子 (4th meld) + 筒9,筒9 = pair
|
||||
// 13 tiles + 1 wildcard = 14
|
||||
var hand = new List<int> { 1, 1, 1, 2, 3, 4, 5, 6, 7, 11, 11, 9, 9 };
|
||||
var result = _solver.CheckWin(hand, wildcardCount: 1);
|
||||
Assert.True(result.IsWin);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user