Choose a random side against the computer
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 78/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- javascript
调研方向
阅读 index.html 中的 #side-select 和 js/main.js 第 190–197 行附近的代码,追踪所选方如何保存以及棋盘如何翻转。然后检查 js/game.js 和 tests/unit/settings.test.js,了解新游戏和已保存游戏状态的工作方式。添加 Random 选项,使每局新游戏都选择一方,同时重新加载时保留该局的所选方;使用桩替换的 Math.random 运行 npm ci && npm test 进行验证。
由索引模型根据 Issue 内容生成。
描述
Summary
Against the computer the player chooses White or Black; there is no Random option.
Where
index.html:159-161(#side-select)js/main.js:190-197(the choice is stored and also flips the board)
Proposal
Add a "Random" option. Store random as the setting, and pick White or Black at each New Game, flipping the board to match. The chosen side is recorded in the game as today, so reload and PGN stay correct.
Who benefits
Players who want variety without choosing each time; a common option in chess apps.
Acceptance criteria
- With Random selected, New Game picks a side and the board orientation matches
- Reloading keeps the side of the game in progress (it does not re-roll)
- Tests with a stubbed
Math.random
Getting started
- Relevant files:
index.html,js/main.js,js/game.js,tests/unit/settings.test.js - How to run tests:
npm ci && npm test
Filed by repo-audit/full-audit at 73cd279. Severity: low. Effort: S. audit-key: enhancement|index.html|side-select
- 主要语言
- JavaScript
- 星标
- 4
- 派生
- 2
- 平均合并
- 6 小时 13 分钟
- 30 天内合并 PR
- 4
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
TMHSDigital/Static_Chess 的其他 Issue
-
good first issue performance severity: low
难度 2/5 1-3 小时 新手友好度 86/100
TMHSDigital/Static_Chess#157 ·
维护者通常 1 天内回复
-
documentation good first issue severity: low
难度 1/5 1-3 小时 新手友好度 90/100
TMHSDigital/Static_Chess#155 ·
维护者通常 1 天内回复
-
good first issue reliability severity: low
难度 2/5 1-3 小时 新手友好度 88/100
TMHSDigital/Static_Chess#150 ·
维护者通常 1 天内回复
-
bug good first issue severity: low
难度 2/5 1-3 小时 新手友好度 84/100
TMHSDigital/Static_Chess#148 ·
维护者通常 1 天内回复
-
bug good first issue severity: low
难度 2/5 1-3 小时 新手友好度 90/100
TMHSDigital/Static_Chess#145 ·
维护者通常 1 天内回复
查看 TMHSDigital/Static_Chess 的全部 Issue
相似的 Issue
-
marketing
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
enhancement good first issue help wanted
难度 2/5 1-3 小时 新手友好度 88/100
-
[Bug] Account menu (footer ⚙) doesn't dismiss on outside click — stays open and covers the Bot list未关闭
难度 2/5 1-3 小时 新手友好度 82/100
Fei2411/DeepSeek-Bot#1693 ·
-
area-templates triage:bot-seen triage:needs-human
难度 2/5 1-3 小时 新手友好度 75/100
microsoft/aspire#22356 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
HarperFast/skills#153 ·