Astro, Breakout, Pinball and Siege still keep their rules in the scene
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 62/100
- Tipo de issue
- Refatoração
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Stack de tecnologia
- typescript
- Domínio
- game-dev, testing-qa
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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
- Linguagem predominante
- TypeScript
- Estrelas
- 3
- Forks
- 3
- Merge médio
- 10h 22min
- PRs com merge (30d)
- 6
Preparar o ambiente
Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de TMHSDigital/GH-Arcade
-
good first issue performance severity: low
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 72/100
TMHSDigital/GH-Arcade#141 ·
Mantenedores costumam responder em até 1 dia
-
enhancement help wanted severity: low
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 55/100
TMHSDigital/GH-Arcade#139 ·
Mantenedores costumam responder em até 1 dia
-
enhancement help wanted severity: medium
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 56/100
TMHSDigital/GH-Arcade#127 ·
Mantenedores costumam responder em até 1 dia
-
enhancement help wanted severity: medium
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
TMHSDigital/GH-Arcade#126 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
accessibility enhancement severity: low
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 40/100
TMHSDigital/GH-Arcade#114 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de TMHSDigital/GH-Arcade
Issues semelhantes
-
clawsweeper:needs-maintainer-review clawsweeper:needs-product-decision clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster P3
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
openclaw/openclaw#203385 · 1 comentário · 1 reação ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
nwverse/persona#12800 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 80/100
Mantenedores costumam responder em até 1 dia
-
[MCP]: page snapshots in .playwright-mcp/ are not git-ignored (.playwright-cli/ is, since #42318)Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
microsoft/playwright#44289 ·
Mantenedores costumam responder em até 1 dia
-
good first issue
Dificuldade 2/5 Meio dia Facilidade para iniciantes 65/100
Mantenedores costumam responder em até 1 dia