Hint, Show solution, give up and an unrated retry #445

Closed
opened 2026-10-16 08:20:38 +00:00 by root · 5 comments
root commented 2026-10-16 08:20:38 +00:00 (Migrated from gitlab.core-project.space)

Parent

#440

What to build

A Player can ask for help, see the answer, give up, or retry a failed Puzzle, with the rating rules of #441 applied.

  • Hint: highlights the piece to move, with the board's existing marks. On a pending Attempt, a warning first says it counts as a failure; confirming fails the Attempt and moves the Puzzle rating, then shows the Hint.
  • Show solution: plays the rest of the line on the board. On a pending Attempt it fails it first. Giving up is the same call.
  • Retry: after a failure, restarts the Puzzle from its start as an unrated Replay, marked unrated. A Replay is stateless: the client sends the Puzzle id and the line played so far, and the server checks the prefix and the new Move with the same rules as an Attempt. Hints and the solution are free during a Replay. A Replay never moves the Puzzle rating nor changes the Attempt's state.
  • Contract: hint and solution on the puzzle router, and the optional line on move; a stale or forged line is refused. Copy in English and French.

Seams: S1 (the API through its RPC contract) and S3 (the app's router with the API fakes). Covers stories 22-26, 32, 46 of #440.

Acceptance criteria

  • A Hint on a pending Attempt fails it, moves the rating once, and returns the square of the piece to move.
  • A Hint or the solution after the Attempt is resolved moves nothing.
  • The solution returns the rest of the line and fails a pending Attempt; the board plays it.
  • A Retry replays the Puzzle unrated: correct, wrong and Checkmate Moves are checked as in an Attempt; the rating and the Attempt do not change.
  • A Replay line that is not a prefix of the solution is refused.
  • The warning before the first Hint can be cancelled, and cancelling changes nothing.
  • Front view tests cover the Hint highlight, the warning, the solution playing out, Retry and the unrated marker.
  • The gate is green (CONTRIBUTING.md, "The five commands").
## Parent #440 ## What to build A Player can ask for help, see the answer, give up, or retry a failed Puzzle, with the rating rules of #441 applied. - **Hint:** highlights the piece to move, with the board's existing marks. On a pending Attempt, a warning first says it counts as a failure; confirming fails the Attempt and moves the Puzzle rating, then shows the Hint. - **Show solution:** plays the rest of the line on the board. On a pending Attempt it fails it first. Giving up is the same call. - **Retry:** after a failure, restarts the Puzzle from its start as an unrated **Replay**, marked unrated. A Replay is stateless: the client sends the Puzzle id and the line played so far, and the server checks the prefix and the new Move with the same rules as an Attempt. Hints and the solution are free during a Replay. A Replay never moves the Puzzle rating nor changes the Attempt's state. - **Contract:** `hint` and `solution` on the `puzzle` router, and the optional `line` on `move`; a stale or forged line is refused. Copy in English and French. Seams: S1 (the API through its RPC contract) and S3 (the app's router with the API fakes). Covers stories 22-26, 32, 46 of #440. ## Acceptance criteria - [ ] A Hint on a pending Attempt fails it, moves the rating once, and returns the square of the piece to move. - [ ] A Hint or the solution after the Attempt is resolved moves nothing. - [ ] The solution returns the rest of the line and fails a pending Attempt; the board plays it. - [ ] A Retry replays the Puzzle unrated: correct, wrong and Checkmate Moves are checked as in an Attempt; the rating and the Attempt do not change. - [ ] A Replay line that is not a prefix of the solution is refused. - [ ] The warning before the first Hint can be cancelled, and cancelling changes nothing. - [ ] Front view tests cover the Hint highlight, the warning, the solution playing out, Retry and the unrated marker. - [ ] The gate is green (`CONTRIBUTING.md`, "The five commands").
root commented 2026-10-16 08:21:03 +00:00 (Migrated from gitlab.core-project.space)

mentioned in issue #447

mentioned in issue #447
root commented 2026-10-16 08:21:30 +00:00 (Migrated from gitlab.core-project.space)

marked this issue as related to #440

marked this issue as related to #440
root commented 2026-10-16 08:21:42 +00:00 (Migrated from gitlab.core-project.space)

marked this issue as related to #443

marked this issue as related to #443
root commented 2026-10-16 08:21:44 +00:00 (Migrated from gitlab.core-project.space)

marked this issue as related to #447

marked this issue as related to #447
root commented 2026-10-18 13:02:28 +00:00 (Migrated from gitlab.core-project.space)

mentioned in merge request !554

mentioned in merge request !554
root (Migrated from gitlab.core-project.space) closed this issue 2026-10-19 09:58:35 +00:00
Sign in to join this conversation.
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.

Reference
amaurycoudr/chess-project#445
No description provided.