Skip to content

refactor: décomposer engine.ts en 3 modules spécialisés - #385

Merged
thomasgermain93 merged 2 commits into
mainfrom
refactor/issue-375-engine-modules
Mar 22, 2026
Merged

thomasgermain93 merged 2 commits into
mainfrom
refactor/issue-375-engine-modules

Conversation

@thomasgermain93

Copy link
Copy Markdown
Owner

Summary

  • Extrait generateMap() et ses dépendances dans src/game/mapGenerator.ts
  • Extrait l'algorithme A* (findPath), isAdjacentToTarget et findNearestTarget dans src/game/pathfinding.ts (heap interne non exporté)
  • Extrait getExplosionTiles, buildDangerSet, isInDangerZone et findSafeSpot dans src/game/explosionSystem.ts
  • engine.ts est réduit à ~290 lignes : conserve tickGame(), getClanBonus(), buildStoryTargets() et genId
  • Re-exports depuis engine.ts pour la compatibilité ascendante — aucun fichier consommateur modifié

Closes #375

Test plan

  • npm run build passe sans erreur
  • npm run test : 246 tests passent (15 fichiers de tests)
  • Aucun fichier en dehors de src/game/ n'a été modifié

🤖 Generated with Claude Code

- Extrait generateMap() dans mapGenerator.ts
- Extrait findPath(), isAdjacentToTarget(), findNearestTarget() dans pathfinding.ts
- Extrait getExplosionTiles(), buildDangerSet(), isInDangerZone(), findSafeSpot() dans explosionSystem.ts
- engine.ts re-exporte tout pour la compatibilité ascendante — aucun fichier consommateur modifié

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Mar 22, 2026

Copy link
Copy Markdown

Deploying bomberquest with  Cloudflare Pages  Cloudflare Pages

Latest commit: b838113
Status:⚡️  Build in progress...

View logs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@thomasgermain93
thomasgermain93 merged commit 3510d65 into main Mar 22, 2026
1 of 2 checks passed
github-actions Bot added a commit that referenced this pull request Mar 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ARCH] Décomposer engine.ts (796 lignes) en modules spécialisés

1 participant