Refine setup flow and round resolution: reorderable players, profile quick-add, deferred summary scoring, and non-stacking 31 pot bonus #3

Merged
admin-backup merged 3 commits from copilot/modify-game-configuration-features into main 2026-04-12 14:02:27 +02:00
admin-backup commented 2026-04-12 13:21:46 +02:00 (Migrated from 172.24.0.1:8928)

This PR addresses several gameplay and UX inconsistencies in setup, round flow, and scoring. It improves player configuration ergonomics, aligns score application timing with the summary screen, and updates 31-point rule behavior to apply pot bonus once per round.

  • Setup ergonomics (player order + profile usage)

    • Added per-player reorder controls (↑ / ↓) in setup so player order can be adjusted inline.
    • Reordering keeps name, magic number, and theme arrays synchronized.
    • Replaced profile default-toggle usage in setup list with a + action to append a profile as a new player at the end of the current configuration.
  • Android back navigation hardening

    • Intercepted hardware back on GameScreen and ScoreScreen.
    • Back now opens a confirmation dialog; cancelling keeps the user in flow, confirming resets to setup.
  • End screen layout/actions

    • Moved end-of-round actions into a fixed footer on ScoreScreen.
    • Swapped action order so “Tour suivant” is on the right.
    • Added accessibility hints for both footer actions.
  • Round scoring lifecycle correction

    • Deferred loser drink application and all-time leaderboard increment to openRoundSummary() instead of applying during last-turn finalization.
    • Introduced roundSummaryApplied guard to ensure summary application is idempotent and not double-counted.
  • Rule update: non-stacking 31

    • Updated pot delta logic so only the first 31 in a round contributes +10 to the pot.
    • Subsequent 31 rolls in the same round still register as special outcomes but do not add additional pot bonus.
    • Updated rules modal wording to reflect this behavior.
const { potDelta, specials } = getPotDeltaAndSpecials(
  score,
  normalizedDice,
  state.settings.enableMagicNumber,
  currentPlayer.magicNumber,
  !state.turns.some((turn) => turn.score === 31), // only first 31 adds +10
);
This PR addresses several gameplay and UX inconsistencies in setup, round flow, and scoring. It improves player configuration ergonomics, aligns score application timing with the summary screen, and updates 31-point rule behavior to apply pot bonus once per round. - **Setup ergonomics (player order + profile usage)** - Added per-player reorder controls (`↑` / `↓`) in setup so player order can be adjusted inline. - Reordering keeps `name`, `magic number`, and `theme` arrays synchronized. - Replaced profile default-toggle usage in setup list with a `+` action to append a profile as a new player at the end of the current configuration. - **Android back navigation hardening** - Intercepted hardware back on `GameScreen` and `ScoreScreen`. - Back now opens a confirmation dialog; cancelling keeps the user in flow, confirming resets to setup. - **End screen layout/actions** - Moved end-of-round actions into a fixed footer on `ScoreScreen`. - Swapped action order so **“Tour suivant”** is on the right. - Added accessibility hints for both footer actions. - **Round scoring lifecycle correction** - Deferred loser drink application and all-time leaderboard increment to `openRoundSummary()` instead of applying during last-turn finalization. - Introduced `roundSummaryApplied` guard to ensure summary application is idempotent and not double-counted. - **Rule update: non-stacking 31** - Updated pot delta logic so only the first `31` in a round contributes `+10` to the pot. - Subsequent `31` rolls in the same round still register as special outcomes but do not add additional pot bonus. - Updated rules modal wording to reflect this behavior. ```ts const { potDelta, specials } = getPotDeltaAndSpecials( score, normalizedDice, state.settings.enableMagicNumber, currentPlayer.magicNumber, !state.turns.some((turn) => turn.score === 31), // only first 31 adds +10 ); ```
admin-backup commented 2026-04-12 13:21:46 +02:00 (Migrated from 172.24.0.1:8928)

assigned to @Copilot

assigned to `@Copilot`
admin-backup commented 2026-04-12 13:21:46 +02:00 (Migrated from 172.24.0.1:8928)

assigned to @THoguet

assigned to `@THoguet`
admin-backup commented 2026-04-12 14:02:27 +02:00 (Migrated from 172.24.0.1:8928)

Merged by: THoguet at 2026-04-12 12:02:27 UTC

*Merged by: THoguet at 2026-04-12 12:02:27 UTC*
admin-backup (Migrated from 172.24.0.1:8928) closed this pull request 2026-04-12 14:02:27 +02:00
admin-backup (Migrated from 172.24.0.1:8928) merged commit into main 2026-04-12 14:02:27 +02:00

Preserved GitLab !2 history: source attribution, exact timestamps, discussion grouping and review positions. Historical diff snapshots: 1; visible source notes: 3.

gitlab-6-mergerequest-2.md (SHA-256 ad616522e929f2541e139b7ee998b4e7e6968302ed3fac41f7bd802b7e9ccda5)

gitlab-6-mergerequest-2.json (SHA-256 7c7d5657cb8f73da81256ad83b1e9234c597c6a520510aacf4280272dd1d7756)

Old CI job execution and reports are omitted. Original source files and rollback backups remain protected.

<!-- gitlab-to-gitea-history:6:MergeRequest:2 --> Preserved GitLab !2 history: source attribution, exact timestamps, discussion grouping and review positions. Historical diff snapshots: 1; visible source notes: 3. [gitlab-6-mergerequest-2.md](https://gitea.nessar.fr/attachments/d0726393-95aa-4269-ab25-05d72e78d5ea) (SHA-256 `ad616522e929f2541e139b7ee998b4e7e6968302ed3fac41f7bd802b7e9ccda5`) [gitlab-6-mergerequest-2.json](https://gitea.nessar.fr/attachments/4837fc58-7b2f-4c46-88fb-03f99502eaef) (SHA-256 `7c7d5657cb8f73da81256ad83b1e9234c597c6a520510aacf4280272dd1d7756`) Old CI job execution and reports are omitted. Original source files and rollback backups remain protected.
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: nessar/21#3