Stale code comments, and README gaps on promotion, undo and keyboard play

未关闭 适合新手
#48 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
83/100
Issue 类型
文档
描述清晰度
描述清楚
活跃度
活跃
技术栈
javascript

调研方向

阅读js/game.js、js/utils.js、js/config.js和js/main.js中列出的注释,然后将它们与所引用的代码和README章节进行对照。更新或删除每条过时的注释,并在README.md指定的章节中说明只能升变为后、Undo和键盘控制。运行npm test和npm run lint;所有列出的项目都已修正时即为完成。

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

描述

documentation good first issue severity: low

Summary

Several comments contradict the code, and the README does not tell players about two limits of the current build.

Where

  • js/game.js:15: "For undo and repetition detection". No repetition detection exists.
  • js/game.js:667-668, :696-698: "Using plain objects here" and "If Piece was a class". Piece is a constructor (js/pieces.js:22) and promotion calls new Piece(...).
  • js/game.js:796-811: generateNotation carries a disambiguation TODO, but live notation comes from generateNotationWithDisambiguation.
  • js/utils.js:221-223: "Add more utility functions as needed, e.g. Deep cloning". deepClone is already at :60.
  • js/utils.js:176-177: "Will be used when sound effects feature is enabled". It is already called from game.js.
  • js/config.js:10: "Feature flags (for future enhancements)" sits above DRAG_AND_DROP: true.
  • js/main.js:83-85: "initializes the skeleton implementations". Drag and drop is the only module started, and it is complete.
  • README.md:72: lists pawn promotion with no note that it always promotes to a queen (js/game.js:223).
  • README.md:150-165: "How to Play" omits the Undo button and the keyboard controls.

Suggested fix

Fix or remove each comment. Add to the README: promotion is always to a queen, an Undo and keyboard-controls line in "How to Play".

Acceptance criteria

  • Each item above is corrected

Getting started

  • Relevant files: js/game.js, js/utils.js, js/config.js, js/main.js, README.md
  • 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: low. Effort: S. audit-key: documentation|js/game.js|stale-comments

主要语言
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 摘要。