Add a flip board option
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 76/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- css, html, javascript
Hướng nghiên cứu
Read js/board.js around createBoard and the keyboard handler, then inspect settings wiring in js/main.js, the toggles in index.html, and board styling in css/board.css. Run npm test and npm run lint as the issue describes. Done when the flip toggle persists after reload and the coordinates and arrow-key movement match the displayed orientation.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
The board is always drawn with White at the bottom. With two people sharing one device, Black always plays upside down, and a flip option becomes necessary once a player can choose Black against a computer.
Where
js/board.js:16-27(createBoardappends squares in a fixed order)index.html:28-57(settings panel, four toggles, none for orientation)
Proposal
Add a "Flip board" toggle, persisted like the other settings. Squares carry data-row and data-col and lookups go through getSquareElement, so flipping can be done in presentation only: a class on the board that reverses the grid order, or a reversed append order in createBoard. Check that coordinate labels and the arrow-key directions in the keyboard handler (js/board.js:111-127) follow the visual orientation. Optional: flip automatically each turn.
Who benefits
The player with the black pieces.
Acceptance criteria
- A toggle flips the board and the choice survives a reload
- Coordinates and arrow keys match what is on screen
Getting started
- Relevant files:
js/board.js,js/main.js,index.html,css/board.css - How to run tests:
npm install, thennpm testandnpm run lint - Related docs:
docs/ARCHITECTURE.md,.github/CONTRIBUTING.md
Filed by repo-audit/full-audit at 8a2c86c. Severity: low. Effort: S. audit-key: enhancement|js/board.js|createBoard.orientation
- 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
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của TMHSDigital/Static_Chess
-
enhancement good first issue severity: medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
TMHSDigital/Static_Chess#53 ·
-
documentation good first issue severity: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
TMHSDigital/Static_Chess#49 ·
-
documentation good first issue severity: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
TMHSDigital/Static_Chess#48 ·
-
documentation severity: medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
TMHSDigital/Static_Chess#47 ·
-
documentation good first issue severity: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
TMHSDigital/Static_Chess#46 ·
Tất cả issue của TMHSDigital/Static_Chess
Issue tương tự
-
good first issue tests
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Download a leaderboard as CSVĐang mởenhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
-
1️⃣ phase/under-investigation flaky/confirmed flaky/needs-decision type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
growilabs/growi#12246 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
TMHSDigital/Free-Game-Dev-Assets#301 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100