Export the game: copy moves or download PGN

未关闭
#55 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
72/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
javascript
领域
frontend

调研方向

Read js/game.js:738-785 and js/game.js:232-233 to trace move history and stored notation, then inspect js/game.js:904 and index.html:21-24 for en passant notation and the page controls. Run npm test and npm run lint as the issue describes. Done when the Copy PGN control produces text accepted by a standard PGN viewer, with correct results for checkmate, stalemate, and unfinished games.

由索引模型根据 Issue 内容生成。

描述

enhancement good first issue severity: medium

Summary

SAN is already generated and stored for every move, but the only output is the on-page move list. A finished game cannot be taken to an analysis board, shared or archived.

Where

  • js/game.js:738-785 (updateMoveHistoryDisplay)
  • js/game.js:232-233 (move.notation stored per move)
  • js/game.js:904 (appends e.p., which PGN parsers reject)
  • index.html:21-24

Proposal

Add a "Copy PGN" button that joins the move history into numbered movetext, adds the seven-tag roster with Result derived from the game state, and writes it to the clipboard (fallback: a download). Drop the e.p. suffix in the exported text. PGN import is a larger follow-up and not part of this.

Who benefits

Players who want to review or share a game.

Acceptance criteria

  • The exported text loads in a standard PGN viewer
  • Result is correct for checkmate, stalemate and unfinished games

Getting started

  • Relevant files: js/game.js, index.html
  • How to run tests: npm install, then npm test and npm run lint
  • Related docs: docs/ARCHITECTURE.md, .github/CONTRIBUTING.md

Filed by repo-audit/full-audit at 8a2c86c. Severity: medium. Effort: S. audit-key: enhancement|js/game.js|updateMoveHistoryDisplay

主要语言
JavaScript
星标
4
派生
2
PR 合并指标
30 天内没有已合并 PR

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

TMHSDigital/Static_Chess 的其他 Issue

查看 TMHSDigital/Static_Chess 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。