Neon Golf: add hot-seat stroke play for 2 to 4 players

未关闭
#127 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
56/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
typescript
领域
frontend, game-dev

调研方向

Read games/golf/scenes/MenuScene.ts, games/golf/scenes/GameScene.ts, and games/golf/scoring.ts, then compare the multiplayer flow in games/tanks/scenes/MenuScene.ts and shared/scenes.ts. Run npm test and review games/golf/scoring.test.ts; done means the menu offers 2 to 4 players, each player's score is summarized, tee order is covered, and a completed round shows a winner.

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

描述

enhancement help wanted severity: medium

Summary

Neon Golf is solo only. Mini golf is the classic pass-the-device game, and its turn-based shot loop needs no simultaneous input, so it suits hot-seat stroke play for 2 to 4 players.

Where

  • games/golf/scenes/MenuScene.ts:23-28: no modes
  • games/golf/scenes/GameScene.ts:111-118: init() takes no data; one card: number[]
  • games/golf/scoring.ts:63, 83: scorecardLines and summarize work on one player
  • games/tanks/scenes/MenuScene.ts:42-46 and shared/scenes.ts:187 (showMatchResult): the existing pattern for a 2-player mode

Proposal

  • Add menu modes 1 to 4 PLAYERS, with data: { players: n }.
  • Keep a card per player and alternate players on each hole, with each holing out before the next tees off.
  • Color the ball per player, and show one scorecard row per player.
  • End multi-player rounds with showMatchResult, which records a play but skips the solo best, as Tanks does.

Who benefits

Two or more people sharing one phone or tablet. Today they have to play separate full rounds and compare totals.

Open questions

  • Tee order: fixed order, or lowest score so far tees first?
  • Tie-break rule.
  • Related to #113 (alternating whole runs), but golf wants alternation per hole and a shared scorecard.

Acceptance criteria

  • Menu offers 2 to 4 players. The scorecard shows every player and the round ends with a winner.
  • games/golf/scoring.test.ts covers the per-player summary and the tee-order rule.

Getting started

  • Relevant files: games/golf/scenes/*, games/golf/scoring.ts
  • How to run tests: npm test

Filed by repo-audit/full-audit at a93de2e. Severity: medium. Effort: M. audit-key: enhancement|games/golf/scenes/GameScene.ts|hot-seat

主要语言
TypeScript
星标
3
派生
3
平均合并
10 小时 22 分钟
30 天内合并 PR
6

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

TMHSDigital/GH-Arcade 的其他 Issue

查看 TMHSDigital/GH-Arcade 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。