二七王:不可查牌模式屏蔽出牌历史(design §9 消歧义 + 代码门控)
design §9 原文把可查牌模式的四项功能列成无序列表,不可查牌只写 「不提供以上任何查看 / 明牌功能」,随后展开的例子却只提了主牌数量、 对子结构、明牌按钮、亮牌统计,没提第一条「已经打出的牌可以查看」, 导致"以上"的范围有歧义。代码据此照发出牌历史,前一轮核对把它记为 待确认项(01 表 D6)。 规则设计者已确认:**不可查牌模式必须屏蔽出牌历史,只有可查牌模式 才能查看**。据此: - design §9 改写为无歧义表述:先给出「查牌 = 回看不该随时可见的信 息」的定义,把可查牌的四项功能编号列出(① 出牌历史 ② 报无主后的 他家主牌数/对子数 ③ 明牌 ④ 庄家亮牌),不可查牌逐条对应说明一项 都不提供;并补一段边界说明——**当前这一轮桌面上的牌两种模式下都 必须可见**,否则后出的人无从跟牌、无从判断本轮谁最大,断线重连同 理(当前轮照常恢复,往轮历史按模式开关给不给)。 - class.export.js:get_deskinfo 的 PushCards.pushlist 构建与排序整 体移入 `if (!cfg.nocheck)`,不查牌时不带该属性;当前轮桌面牌由 PushCards.playproc.cards 恢复,两种模式都有。 - 协议文档:pushlist 补「仅可查牌模式下有此属性」,playproc 补「两 种模式恒有」及其原因。 - 合规文档:01 表 D6 由「待确认/未修」改为已确认并修复,从「尚未处 置」移出;02 测试计划断言总数 357→361 并新增该维度覆盖行。 test_rpc 新增 4 项:不查牌房无 pushlist、可查牌房有 pushlist,且两 种模式下当前轮桌面牌 playproc.cards 都能恢复。 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -166,38 +166,42 @@ var cls_youle_erqiwang_export = cls_youle_erqiwang_export || {
|
||||
}
|
||||
}
|
||||
}
|
||||
//出牌历史
|
||||
deskinfo.PushCards.pushlist = [];
|
||||
for (var i = 0; i < paiju.cards.length; i++) {
|
||||
var pai = paiju.cards[i];
|
||||
if (pai.playround > 0){
|
||||
if (deskinfo.PushCards.pushlist.length < pai.playround){
|
||||
deskinfo.PushCards.pushlist.length = pai.playround;
|
||||
}
|
||||
if (!deskinfo.PushCards.pushlist[pai.playround - 1]){
|
||||
deskinfo.PushCards.pushlist[pai.playround - 1] = [[], [], []];
|
||||
}
|
||||
//出牌历史:往轮打出、已被收走的牌属于「查牌」范畴,仅可查牌模式下发(design §9)。
|
||||
//不查牌模式下不带此属性——当前这一轮桌面上的牌由上面的 playproc 恢复,两种模式都有,
|
||||
//否则后出的人无从跟牌(design §9 末尾的边界说明)
|
||||
if (!cfg.nocheck){
|
||||
deskinfo.PushCards.pushlist = [];
|
||||
for (var i = 0; i < paiju.cards.length; i++) {
|
||||
var pai = paiju.cards[i];
|
||||
if (pai.playround > 0){
|
||||
if (deskinfo.PushCards.pushlist.length < pai.playround){
|
||||
deskinfo.PushCards.pushlist.length = pai.playround;
|
||||
}
|
||||
if (!deskinfo.PushCards.pushlist[pai.playround - 1]){
|
||||
deskinfo.PushCards.pushlist[pai.playround - 1] = [[], [], []];
|
||||
}
|
||||
|
||||
var owner = pai.dealowner;
|
||||
if (owner == 0){
|
||||
owner = paiju.banker + 1;
|
||||
var owner = pai.dealowner;
|
||||
if (owner == 0){
|
||||
owner = paiju.banker + 1;
|
||||
}
|
||||
deskinfo.PushCards.pushlist[pai.playround - 1][owner - 1].push(i);
|
||||
}
|
||||
}
|
||||
//按大小排序:外层下标=轮次、内层恒为 3 个座位;排序须按本局主牌花色
|
||||
//(内层曾误用轮次数作上界,会把内层数组撑成轮次长度并填入 undefined;
|
||||
// 且曾误用上一个循环泄漏出来的 pai.flower——那是最后一张牌大王的花色 5,
|
||||
// 等于按「无主牌」排序)
|
||||
for (var i = 0; i < deskinfo.PushCards.pushlist.length; i++) {
|
||||
if (!deskinfo.PushCards.pushlist[i]){
|
||||
continue;
|
||||
}
|
||||
for (var j = 0; j < 3; j++) {
|
||||
deskinfo.PushCards.pushlist[i][j] = cls_youle_erqiwang_arith.order_cards(paiju.flower, deskinfo.PushCards.pushlist[i][j]);
|
||||
}
|
||||
deskinfo.PushCards.pushlist[pai.playround - 1][owner - 1].push(i);
|
||||
}
|
||||
}
|
||||
//按大小排序:外层下标=轮次、内层恒为 3 个座位;排序须按本局主牌花色
|
||||
//(内层曾误用轮次数作上界,会把内层数组撑成轮次长度并填入 undefined;
|
||||
// 且曾误用上一个循环泄漏出来的 pai.flower——那是最后一张牌大王的花色 5,
|
||||
// 等于按「无主牌」排序)
|
||||
for (var i = 0; i < deskinfo.PushCards.pushlist.length; i++) {
|
||||
if (!deskinfo.PushCards.pushlist[i]){
|
||||
continue;
|
||||
}
|
||||
for (var j = 0; j < 3; j++) {
|
||||
deskinfo.PushCards.pushlist[i][j] = cls_youle_erqiwang_arith.order_cards(paiju.flower, deskinfo.PushCards.pushlist[i][j]);
|
||||
}
|
||||
}
|
||||
break;
|
||||
break;
|
||||
case 6: //结算
|
||||
deskinfo.Balance = {};
|
||||
//玩家的准备状态
|
||||
|
||||
Reference in New Issue
Block a user