refactor(game)!: replace phase terminology with rounds (#13) #22

Merged
Reliodas merged 1 commit from refactor/13-rename-phases-to-rounds into develop 2026-06-22 17:29:48 +00:00
Owner

Implémente le ticket #13 : remplace le vocabulaire technique phase par round, de façon atomique sur serveur, client, tests et documentation.

Changements

  • Fichiers : server/src/modules/game/phases/rounds/ ; phase1.jsround1.js, phase2.jsround2.js (+ tests).
  • État : room.game.phaseround, room.game.phase2round2, player.phase2Scoreround2Score ; projections game.state mises à jour.
  • Contrat Socket.IO : actions start-phase2/finish-phase2start-round2/finish-round2 ; statuts phase2-scoreboard/phase2-finishedround2-scoreboard/round2-finished.
  • Client : état useSocket, conditions de vue, computed (sortedByRound2), payloads d'action, classes CSS p2-*round2-*.
  • Textes UI français : « Phase 2 » → « Deuxième manche », « Phase 3 » → « finale » ; commentaires de dev en anglais « Round ».
  • Docs : Implémentation.md, AGENTS.md, README.md, CONTRIBUTING.md alignés sur le vocabulaire round.

Rupture de protocole

⚠️ BREAKING CHANGE : les propriétés d'état, statuts et actions utilisent désormais le vocabulaire round. Aucun alias de compatibilité conservé (conforme à la décision du ticket).

Vérification (aucun changement de comportement)

  • cd server && npm test → 70/70 (1 skip pré-existant)
  • cd client && npm test → 33/33
  • cd client && npm run build → OK
  • grep -RniE "phase" sur le code, les tests et les docs → aucune occurrence
  • git diff --check → propre

Refs #13

Implémente le ticket #13 : remplace le vocabulaire technique `phase` par `round`, de façon atomique sur serveur, client, tests et documentation. ## Changements - **Fichiers** : `server/src/modules/game/phases/` → `rounds/` ; `phase1.js`→`round1.js`, `phase2.js`→`round2.js` (+ tests). - **État** : `room.game.phase`→`round`, `room.game.phase2`→`round2`, `player.phase2Score`→`round2Score` ; projections `game.state` mises à jour. - **Contrat Socket.IO** : actions `start-phase2`/`finish-phase2` → `start-round2`/`finish-round2` ; statuts `phase2-scoreboard`/`phase2-finished` → `round2-scoreboard`/`round2-finished`. - **Client** : état `useSocket`, conditions de vue, computed (`sortedByRound2`), payloads d'action, classes CSS `p2-*` → `round2-*`. - **Textes UI français** : « Phase 2 » → « Deuxième manche », « Phase 3 » → « finale » ; commentaires de dev en anglais « Round ». - **Docs** : `Implémentation.md`, `AGENTS.md`, `README.md`, `CONTRIBUTING.md` alignés sur le vocabulaire `round`. ## Rupture de protocole ⚠️ **BREAKING CHANGE** : les propriétés d'état, statuts et actions utilisent désormais le vocabulaire `round`. Aucun alias de compatibilité conservé (conforme à la décision du ticket). ## Vérification (aucun changement de comportement) - `cd server && npm test` → 70/70 (1 skip pré-existant) - `cd client && npm test` → 33/33 - `cd client && npm run build` → OK - `grep -RniE "phase"` sur le code, les tests et les docs → aucune occurrence - `git diff --check` → propre Refs #13
Reliodas added this to the 1.0.0-alpha milestone 2026-06-22 17:28:57 +00:00
refactor(game)!: replace phase terminology with rounds
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/pull_request_metadata/woodpecker Pipeline was successful
ci/woodpecker/pull_request_closed/woodpecker Pipeline was successful
0eedbefb56
Rename the historical "phase" vocabulary to "round" across server,
client, tests and documentation, in a single atomic change. Product
docs already use "première/deuxième manche"; the code now uses the
matching English identifiers.

- Files: server/src/modules/game/phases/ -> rounds/, phase1.js ->
  round1.js, phase2.js -> round2.js (+ test files).
- State: room.game.phase -> round, room.game.phase2 -> round2,
  player.phase2Score -> round2Score; game.state projections updated.
- Socket.IO contract: actions start-phase2/finish-phase2 ->
  start-round2/finish-round2; statuses phase2-scoreboard/phase2-finished
  -> round2-scoreboard/round2-finished.
- Client: useSocket state, view conditions, computed (sortedByRound2),
  emitted actions, and CSS classes p2-* -> round2-*.
- French user-facing labels move from "Phase 2"/"Phase 3" to "Deuxième
  manche"/"finale"; dev comments use "Round".
- Docs (Implémentation.md, AGENTS.md, README.md, CONTRIBUTING.md)
  updated to the round vocabulary.

No behavior change: server 70 tests + client 33 tests pass, client
build succeeds.

Refs #13

BREAKING CHANGE: game state properties, statuses and actions now use round terminology (round, round2, round2Score, start-round2, finish-round2, round2-scoreboard, round2-finished).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Reliodas merged commit 3b80e8b057 into develop 2026-06-22 17:29:48 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: jeux/le-grand-concours#22
No description provided.