Skip to content

加入复盘/对局内聊天功能,存在一个bug待修复:复盘进入新分支时,翻开的暗子是该位置走法的子,而不是原本的子 - #9

Open
Acechann wants to merge 1 commit into
bosprimigenious:mainfrom
Acechann:goback

Conversation

@Acechann

@Acechann Acechann commented Jun 9, 2026

Copy link
Copy Markdown

No description provided.

@bosprimigenious

Copy link
Copy Markdown
Owner

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5b9d7e3da1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

cell.addProperty("visible", true);
} else {
cell.addProperty("piece", PieceJsonMapper.toJsonName(p.getVirtualType()));
cell.addProperty("piece", PieceJsonMapper.toJsonName(p.getType()));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep hidden pieces serialized as virtual types

In normal play, initialBoard feeds parseInitialBoard and then computeHints/getValidMoves, and those frontend rules explicitly treat Piece.type on unrevealed pieces as the position's virtualType, while the server validator uses ChessPiece.getMoveType() (virtual type while unrevealed). Sending p.getType() here makes the client pre-validate dark-piece moves using the shuffled real identity instead, so many legal dark-piece moves are blocked before sendMove and other hinted moves are rejected by the server; it also exposes hidden identities in the payload.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Acechann 修一下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants