{"ns":"chess","title":"Gambit Club","version":"1.8","summary":"Gambit Club is a small online chess club. Players face deterministic bots (Levels 1 to 3) or a friend on one screen, move by click or typed notation, import and export FEN and PGN, solve mate puzzles, replay finished games and track an Elo rating. Guests can play casual games and solve puzzles; rated games, History and Profile need an account.","problem":"Players need a chess board that applies the rules of the game exactly and predictably, with ratings that move in the right direction, so that results and history can be trusted.","personas":[{"name":"Club member","need":"Play rated games against bots and watch the rating and record follow every result."},{"name":"Casual guest","need":"Start a game or a puzzle immediately without an account."},{"name":"Learner","need":"See legal moves, check warnings and clear notation, and replay finished games move by move."}],"goals":["Every rule of chess (castling, en passant, promotion, stalemate, checkmate) is enforced exactly.","Bots always answer the same moves the same way, so games are repeatable.","A rated result always moves the rating in the right direction and is recorded in History and Profile."],"features":[{"id":"AUTH","title":"Sign-in and access","summary":"Account sign-in, guest access and the pages that require an account.","reqs":[{"id":"FR-AUTH-01","weight":"Must","text":"A member signs in with username and password and lands on the Play screen showing their name and rating.","accept":["The top bar shows the display name, \"Rating <n>\" and a \"Sign out\" button","The \"Rated game\" option becomes enabled"]},{"id":"FR-AUTH-02","weight":"Should","text":"Sign-in reports missing and wrong input separately and never signs the user in on error.","accept":["No username: \"Enter your username\" with focus in the username field","No password: \"Enter your password\"","Wrong credentials: \"Wrong username or password\" and the login screen stays open","\"Continue as guest\" opens Play with the top bar showing \"Guest\""]},{"id":"FR-AUTH-03","weight":"Could","text":"History and Profile are available to signed-in members only; Puzzles stay open to guests.","accept":["Guest History: \"Sign in to see your games\"","Guest Profile: \"Sign in to see your profile\""]}]},{"id":"LOB","title":"Game lobby","summary":"Choosing opponent, level, colour and clock before a game.","reqs":[{"id":"FR-LOB-01","weight":"Must","text":"The lobby offers every game option with fixed defaults and navigation to the four areas of the club.","accept":["Heading \"New game\"; Opponent: Bot / Hot-seat; Bot level: Level 1, 2, 3; Your colour: White / Black; Time control: 5+0, 3+2, Untimed","Defaults: Bot, Level 1, White, Untimed","Sidebar: Play, Puzzles, History, Profile"]},{"id":"FR-LOB-02","weight":"Must","text":"Rated play is locked for guests and available to signed-in members against bots.","accept":["Guest: \"Rated game\" is disabled with the note \"Sign in to play rated games.\" and a Sign in link"]},{"id":"FR-LOB-03","weight":"Must","text":"Starting a game opens the board with a heading that names the game and the side to move.","accept":["Bot game: \"Game vs Bot L<level>\", status \"Your move\", \"No moves yet\"","Hot-seat game: \"Hot-seat game\", \"White to move\"","Starting a new game while one is in progress asks for confirmation (\"Leave game\")"]}]},{"id":"BRD","title":"Board and move entry","summary":"Click and typed moves, visual aids and notation.","reqs":[{"id":"FR-BRD-01","weight":"Must","text":"Clicking one of the player’s own pieces selects it and marks only its legal destination squares; clicking it again clears the selection.","accept":["The knight on g1 at the start offers f3 and h3 only","Clicking an opponent piece shows no dots"]},{"id":"FR-BRD-02","weight":"Must","text":"Moves may be typed in algebraic notation or coordinate form; an unreadable or illegal move is rejected without changing the position.","accept":["\"e4\", \"Bc4\", \"O-O\" and \"e2e4\" are accepted when legal","Otherwise the inline error is: Illegal or unreadable move \"<text>\""]},{"id":"FR-BRD-03","weight":"Must","text":"The move list is written in standard algebraic notation, numbered per full move.","accept":["Captures use x (Nxe4, exd5), check +, mate #, castling O-O, promotion a8=N","Black’s move after a break reads \"2. ... Qh4#\""]},{"id":"FR-BRD-04","weight":"Should","text":"The king in check glows on the board and in the status line, and the glow clears when the check is resolved.","accept":["Status reads \"Black to move, in check\"","After the check is parried the status reads \"White to move\" with no glow"]},{"id":"FR-BRD-05","weight":"Could","text":"The last move is tinted gold on both its squares and only those squares."},{"id":"FR-BRD-06","weight":"Could","text":"Each player strip shows captured pieces and a \"+N\" material difference for the side ahead.","accept":["Equal material shows no \"+\" on either side","After 1.e4 d5 2.exd5 White’s strip shows one black pawn and \"+1\""]},{"id":"FR-BRD-07","weight":"Could","text":"The board can be flipped by the \"Flip board\" button or the F key; a game played as Black starts flipped.","accept":["Unflipped: ranks 1 to 8 in the left column (8 on top), files a to h along the bottom","Flipped: Black at the bottom, rank 1 on top, files run h to a"]}]},{"id":"RUL","title":"Rules of chess","summary":"Exact enforcement of special moves and game endings.","reqs":[{"id":"FR-RUL-01","weight":"Must","text":"A king may not castle out of, through or into an attacked square.","accept":["With a bishop attacking f1, the king on e1 has no destination dots and \"O-O\" is rejected as illegal","Once the diagonal is blocked the position is playable again","Castling with no attacked square is legal: O-O puts the king on g1 and the rook on f1"]},{"id":"FR-RUL-02","weight":"Must","text":"En passant is legal only on the move immediately after the double pawn step.","accept":["1.e4 a6 2.e5 d5 3.exd6 captures the d5 pawn","If any other move is played first, exd6 is rejected as illegal"]},{"id":"FR-RUL-03","weight":"Must","text":"A pawn reaching the last rank opens a \"Promote pawn to\" dialog offering Queen, Rook, Bishop and Knight, and the chosen piece is placed.","accept":["Escape closes the dialog and leaves the pawn unmoved","Choosing Knight on a8 gives a white knight and the notation a8=N"]},{"id":"FR-RUL-04","weight":"Must","text":"A side with no legal move and not in check has drawn by stalemate, never lost.","accept":["Status \"Draw by stalemate\"; the move box is replaced by \"New game\" and \"Export PGN\""]},{"id":"FR-RUL-05","weight":"Must","text":"A side in check with no legal move is checkmated and the opponent wins.","accept":["Status \"<Side> wins by checkmate\"","Casual games show \"Casual game, no rating change\""]}]},{"id":"BOT","title":"Bot opponents","summary":"Deterministic replies for Levels 1 to 3.","reqs":[{"id":"FR-BOT-01","weight":"Must","text":"The Level 1 bot answers 1.e4 with a5 and 2.Bc4 with a4, so a fixed opening is repeatable.","accept":["The bot reply appears automatically and the status returns to \"Your move\""]},{"id":"FR-BOT-02","weight":"Should","text":"Bot replies are fixed for a given sequence of moves, and Level 3 differs from Levels 1 and 2 on the third move.","accept":["After e4, Nf3, d4 Levels 1 and 2 reply a5, a4, a3","Level 3 replies a5, a4, b6","When the user plays Black every bot opens with Na3"]},{"id":"FR-BOT-03","weight":"Could","text":"Undo is available only in casual games against a bot and takes back the last move together with the bot reply.","accept":["Undo is disabled before any move and in hot-seat games","After e4 a5, Undo restores the start position with \"No moves yet\""]}]},{"id":"END","title":"Resign, draw and clocks","summary":"Ending a game by resignation or agreement, and time controls.","reqs":[{"id":"FR-END-01","weight":"Should","text":"Resigning asks for confirmation first; Cancel keeps the game going.","accept":["Dialog \"Resign this game?\" with Cancel and Resign, focus on Cancel","Confirming gives \"<Opponent side> wins by resignation\""]},{"id":"FR-END-02","weight":"Should","text":"Draw offers are confirmed first; the bot declines early offers and a hot-seat opponent may accept or decline.","accept":["Confirm dialog \"Offer a draw?\"","Bot: \"The bot declined: too early for a draw\"","Hot-seat: the callout \"<Side> offers a draw\" with Accept and Decline; Accept gives \"Draw by agreement\", Decline continues the game"]},{"id":"FR-END-03","weight":"Could","text":"Each side has a clock matching the chosen time control, and the side to move counts down.","accept":["5+0 starts both clocks at 5:00; 3+2 at 3:00","Untimed shows no clocks"]}]},{"id":"RAT","title":"Ratings","summary":"Elo changes for rated games against bots.","reqs":[{"id":"FR-RAT-01","weight":"Must","text":"A rated win raises the rating and a rated loss lowers it; the result card shows the new rating and the signed change.","accept":["Rated win over Level 1 from 1340 shows \"Rating 1341 (+1)\"","Resigning a rated Level 2 game from 1340 shows \"Rating 1314 (−26)\""]},{"id":"FR-RAT-02","weight":"Must","text":"The Profile reflects every rated result immediately; casual games never change the rating.","accept":["After the win above: Rating 1341, Rated games 8, Record 3W 2D 3L","After the resignation above: Rating 1314, Rated games 8, Record 2W 2D 4L, Last change −26"]}]},{"id":"IMP","title":"Import and export","summary":"FEN and PGN in and out.","reqs":[{"id":"FR-IMP-01","weight":"Should","text":"Export PGN shows the moves played in standard notation, and Copy FEN confirms with a toast.","accept":["After e4 e5 Nf3 the text contains 1. e4 e5 2. Nf3","The exported text lists all moves in the order played"]},{"id":"FR-IMP-02","weight":"Should","text":"Import accepts a FEN or PGN and starts a hot-seat game at that position; empty or invalid input keeps the dialog open with an error.","accept":["Empty: \"Paste a FEN or PGN first\"","Invalid FEN: an error under the text box","Valid input: heading \"Imported position\" and play continues from it, e.g. a 5-ply PGN ends with Bb5 and \"Black to move\""]}]},{"id":"PUZ","title":"Puzzles","summary":"Eight mate puzzles with forced replies.","reqs":[{"id":"FR-PUZ-01","weight":"Should","text":"Eight puzzles are listed and solving one marks it Solved.","accept":["The list runs from \"Back-rank finish\" to \"King steps up\", none Solved initially","A wrong move shows \"Try again\" and resets; the right move shows \"Correct\" and offers Restart and Next puzzle"]},{"id":"FR-PUZ-02","weight":"Could","text":"Multi-move puzzles play the forced reply and expect the follow-up mate.","accept":["\"Queen sacrifice on b8\": Qb8+ shows \"Correct. Black replied Rxb8, now find the mate\"; Rxb8 completes it","\"Next puzzle\" opens \"King steps up\""]}]},{"id":"HIS","title":"History, replay and profile","summary":"Finished games, replay and rating chart.","reqs":[{"id":"FR-HIS-01","weight":"Must","text":"History lists the member’s finished games newest first and can be filtered by outcome.","accept":["Seeded member: 12 rows; Wins 3, Draws 4, Losses 5","The newest row is a loss to Bot L3 by resignation on Sep 24, 2026; the oldest is a win over Bot L1 by checkmate on Sep 2, 2026","A member with no games sees an empty state"]},{"id":"FR-HIS-02","weight":"Could","text":"A finished game can be replayed move by move with buttons and keyboard.","accept":["Replay opens at the start position; Left arrow steps back, Home returns to the start","An unknown game id shows \"Game not found\""]},{"id":"FR-HIS-03","weight":"Could","text":"Profile shows rating, rated games, record and last change, with a rating line chart.","accept":["Seeded member: Rating 1340, Rated games 7, Record 2W 2D 3L, Last change −14; line from 1400 to 1340 over 8 points","A member with no games sees an empty chart state"]}]}],"nfr":[{"id":"NFR-01","weight":"Should","text":"The app fits a 390 px phone with no horizontal scroll, a bottom tab bar replacing the sidebar and the board filling the width with 16 px margins.","accept":["Dialogs fit the screen; puzzle cards stack in one column"]}],"glossary":[{"term":"Hot-seat","meaning":"Two players taking turns on one screen."},{"term":"Rated game","meaning":"A game against a bot whose result changes the member’s Elo rating."},{"term":"FEN / PGN","meaning":"Standard text formats for a position and for a list of moves."}],"outOfScope":["Waiting for a clock to run out","Drag gestures","Real networks or opponents"]}