Astro, Breakout, Pinball and Siege still keep their rules in the scene
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 62/100
- Tipo di issue
- Refactoring
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- game-dev, testing-qa
Direzione di ricerca
Start with the reference pattern in games/pong/rules.ts and its tests, then open games/breakout/scenes/GameScene.ts, the suggested first candidate, and find pure functions for bounce angles, brick hits or level layout parsing. Move one game's functions into games/breakout/rules.ts with no Phaser import, add rules.test.ts, and have the scene call the module. Run npm test; done means the new tests pass and the scene behaves as before.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
Six games keep their rules in Phaser-free modules with unit tests (Stack, Snake, Maze, Runner, Hop and Pong). Astro Blaster, Neon Breakout, Neon Pinball and Star Siege still mix rules with input, audio and drawing in one scene class, so a rules regression in those four has no automated signal.
Where
games/astro/scenes/GameScene.ts(wave sizes, rock splitting, saucer timing and aim)games/breakout/scenes/GameScene.ts(bounce angles, brick hits, power-up rolls, level layout parsing)games/pinball/scenes/GameScene.ts(scoring and ball save, among others); the table data is already ingames/pinball/table.tsgames/siege/scenes/GameScene.ts(formation movement, enemy fire selection, mothership scoring)- The pattern to follow:
games/pong/rules.ts,games/hop/rules.ts,games/runner/rules.ts
Impact
Low. These games work today; the cost is that changes to them can only be checked by playing.
Suggested fix
One game per change, moving code rather than rewriting it, as was done for Pong:
- Pick the functions that take plain numbers and return plain numbers (collision tests, scoring formulas, spawn rules).
- Move them to
games/<slug>/rules.tswith no Phaser import, passing arandomfunction where the rule rolls dice. - Add
rules.test.tsbeside it and have the scene call the module.
Breakout is the best first candidate: its level layout parsing is also the first step of the level editor.
Acceptance criteria
- Each of the four games has a Phaser-free rules module with unit tests
- The scenes call the modules and behavior is unchanged
Getting started
- Relevant files: the four scenes above and the three reference modules
- How to run tests:
npm test - Related docs:
CONTRIBUTING.md("Checks")
Related: #59, #40, #84
Filed by repo-audit/fix-issues at de2b25b. Severity: low. Effort: L. audit-key: tech-debt|games/astro/scenes/GameScene.ts|rules-extraction
- Lingua principale
- TypeScript
- Stelle
- 3
- Fork
- 3
- Merge medio
- 10h 22m
- PR unite (30g)
- 6
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di TMHSDigital/GH-Arcade
-
good first issue performance severity: low
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
TMHSDigital/GH-Arcade#141 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement help wanted severity: low
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
TMHSDigital/GH-Arcade#139 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement help wanted severity: medium
Difficoltà 4/5 3-5 giorni Idoneità per principianti 56/100
TMHSDigital/GH-Arcade#127 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement help wanted severity: medium
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
TMHSDigital/GH-Arcade#126 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
accessibility enhancement severity: low
Difficoltà 4/5 3-5 giorni Idoneità per principianti 40/100
TMHSDigital/GH-Arcade#114 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di TMHSDigital/GH-Arcade
Issue simili
-
clawsweeper:needs-maintainer-review clawsweeper:needs-product-decision clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster P3
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
openclaw/openclaw#203385 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
nwverse/persona#12800 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
I maintainer di solito rispondono entro 1 giorno
-
[MCP]: page snapshots in .playwright-mcp/ are not git-ignored (.playwright-cli/ is, since #42318)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
microsoft/playwright#44289 ·
I maintainer di solito rispondono entro 1 giorno
-
good first issue
Difficoltà 2/5 Mezza giornata Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno