二七王:is_continuous 的 8→6 相邻补花色校验
design §5.3 的「6 与 8 可组成拖拉机」是同花色内的相邻关系,但 is_8/is_6 只判 code % 100,不校验花色,导致 is_continuous(♥8=308, ♣6=206) 与 is_continuous(主8=1408, ♣6=206) 都返回 true。 影响面:get_chongguan 是唯一会拿整手牌(含各花色副牌)去扫描连对 链的调用点,连对链走到主 8 之后,手里任意花色的一对 6 都会被误判 为连续、多算 1 奖,并把链锚点带进副牌继续错误延伸(design §8.1 明确 A 到 5 这一段必须是选定花色的主牌)。其余调用点入参都是同花 色牌表或纯主牌表,不受影响。 改为要求牌编码相差 2(同花色的 8 与 6 恒差 2,跨花色差 100 的倍 数),并保留 is_8/is_6 守卫以免把「主A-主Q」这类差 2 组合放行。 test_arith 新增 5 项:同花色 8-6 连、三组跨花色 8-6 不连、差 2 但 非 8/6 的组合不连。 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -219,8 +219,11 @@ var cls_youle_erqiwang_arith = cls_youle_erqiwang_arith || {
|
||||
if (is_fu2(bigcode) && is_zhuA(smallcode)){
|
||||
return true;
|
||||
}
|
||||
//8、6
|
||||
if (is_8(bigcode) && is_6(smallcode)){
|
||||
//8、6(design §5.3:7 不与 6/8 相连,6 与 8 相连)
|
||||
//必须是同一花色的 8 与 6:牌编码同花色相差 2(主花色 1408-1406=2、副牌 308-306=2),
|
||||
//跨花色则相差 100 的倍数。只判 %100 会把「♥8 + ♣6」误判为连对,
|
||||
//进而在 get_chongguan 扫描整手牌时让副牌的 6 对错误接续主 8、多算奖(design §8.1 连对链)
|
||||
if (is_8(bigcode) && is_6(smallcode) && (bigcode - smallcode == 2)){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user