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

Đang mở Phù hợp với người mới
#48 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
83/100
Loại issue
Tài liệu
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript
Lĩnh vực
documentation, game-dev

Hướng nghiên cứu

Đọc các chú thích được liệt kê trong js/game.js, js/utils.js, js/config.js và js/main.js, sau đó đối chiếu chúng với mã nguồn và các mục README được tham chiếu. Cập nhật hoặc xóa từng chú thích đã lỗi thời, đồng thời ghi lại việc chỉ phong cấp thành hậu, Undo và các thao tác bằng bàn phím trong README.md tại các mục được chỉ định. Chạy npm test và npm run lint; hoàn tất khi mọi mục được liệt kê đều đã được sửa.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
JavaScript
Star
4
Fork
2
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của TMHSDigital/Static_Chess

Tất cả issue của TMHSDigital/Static_Chess

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.