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 摘要。