The rematch spec is implemented; AGENTS.md lists it with notes on the offers, the keyed game route and stale dev builds, TODO.md takes the items left out.
78 lines
4.6 KiB
Markdown
78 lines
4.6 KiB
Markdown
# Rematch and series: requirements
|
||
|
||
Status: implemented on branch `feature/rematch` (based on `develop`); checked in Chrome against the local stack.
|
||
Scope: backend, `packages/core`, web app. The mobile app comes later (see R6).
|
||
|
||
## Goals
|
||
|
||
Two players who enjoyed a game can play again at once, without going back to the lobby, and see how their games
|
||
went: one box per game and the score of the series. Who moves first alternates, so neither player keeps the
|
||
advantage of the first move.
|
||
|
||
## Terms
|
||
|
||
- **Rematch**: a new game between the same two players, started from the game over card when both ask for it.
|
||
- **Series**: a game and the rematches that follow it, one after another. A series has no fixed length; it ends when
|
||
a rematch is not played.
|
||
- **Series score**: games won by each player in the series; draws count for neither.
|
||
- **Rematch request**: one player's "Rematch" waiting for the other's answer.
|
||
|
||
## Requirements
|
||
|
||
### R1. Asking for a rematch
|
||
- R1.1 When a game between two people ends, the game over card offers "Rematch" (Turkish: "Rövanş") to both
|
||
players, unless a player left the game: then the series is over and the card offers "New Game" as now.
|
||
- R1.2 The player who asks sees that they are waiting for the opponent and can withdraw the request.
|
||
- R1.3 The opponent sees the request on their game over card ("Ahmet wants a rematch") with "Rematch" and "No",
|
||
also when they had closed the card.
|
||
- R1.4 When both have asked, the new game starts for both at once, and their game pages show it.
|
||
- R1.5 A request ends without a game when: the opponent says no, the asking player withdraws, either player starts
|
||
looking for another game or starts a bot game, either player goes offline, or the opponent does not answer within
|
||
60 seconds. The asking player is told why ("Ahmet declined", "Ahmet is no longer here").
|
||
- R1.6 "No", or either player starting another game or a search, ends the series: the card offers only "New Game".
|
||
After a withdrawn or unanswered request, either player can ask again.
|
||
- R1.7 A rematch is possible for 10 minutes after the game ended; after that the card only offers "New Game".
|
||
|
||
### R2. Who moves first
|
||
- R2.1 The first game of a series starts with a player chosen at random, as now.
|
||
- R2.2 In every rematch, the player who did not move first in the previous game of the series moves first.
|
||
- R2.3 The players keep their sides of the board in a rematch.
|
||
|
||
### R3. Series score
|
||
- R3.1 From the second game of a series on, the game page shows the series above the board: the series score
|
||
("You 2 – 1 Ahmet") and one box per game, in order.
|
||
- R3.2 A finished game's box shows who won (in that player's colour, a draw neutral), the stones in both stores, a
|
||
mark for who moved first, and whether it ended on time or because someone left.
|
||
- R3.3 The box of the game being played is marked as the current game.
|
||
- R3.4 A finished game's box opens its replay in a new tab, so the live game is not left.
|
||
- R3.5 With more games than fit, the strip shows the latest games and how many earlier ones are not shown; the
|
||
score always counts all games.
|
||
- R3.6 The game over card shows the series score once the series has more than one game.
|
||
- R3.7 Spectators see the series strip too, with the players' names instead of "You".
|
||
- R3.8 The game over card shows the final score as two columns, each player's name above their stones, so names
|
||
and numbers do not run together ("Guest 6894 18 – 30 Bot · Hard" was hard to read).
|
||
|
||
### R4. Games against the bot
|
||
- R4.1 "Play again" after a bot game is a rematch: it starts at once, at the same level (the bot takes a new strength
|
||
as in any new game), and continues the series, with the series strip and alternating first moves.
|
||
- R4.2 The bot never declines a rematch.
|
||
|
||
### R5. Saving and restarts
|
||
- R5.1 Every saved game records which series it belongs to, so that the history can group series later.
|
||
- R5.2 A live game keeps its series across a backend restart (the strip shows the same games). Rematch requests
|
||
waiting at the time of the restart are dropped; the players can ask again.
|
||
|
||
### R6. Mobile app
|
||
- R6.1 The mobile app gets rematch and the series strip with its new design (`TODO.md`, Web redesign). Until then it
|
||
is unchanged: its players never see a rematch request, so a request from a web player to a mobile player ends
|
||
after 60 seconds (R1.5).
|
||
|
||
### R7. Languages
|
||
- R7.1 All texts exist in English and Turkish.
|
||
|
||
## Out of scope (TODO)
|
||
- Series of a fixed length ("best of 3") and declaring a series winner.
|
||
- Grouping series in the game history and on the home page.
|
||
- Taking spectators along to the next game of a series.
|
||
- Rematch and the series strip in the mobile app (R6).
|