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

Đang mở
#127 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

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

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
56/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
frontend, game-dev

Hướng nghiên cứu

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.

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

Mô tả

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

Ngôn ngữ chính
TypeScript
Star
3
Fork
3
Merge trung bình
10 giờ 22 phút
Pull request đã merge (30 ngày)
6

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

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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/GH-Arcade

Tất cả issue của TMHSDigital/GH-Arcade

Issue tương tự

Thêm issue về TypeScript

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.