FA-82572 / Chess move legality / Member archive
King move keeps the queenside right · case 02
After Ke1-f1, white still holds the Q castling right.
Case contract
Input: {"board" (before the move), "rights": castling rights string or "-", "move": [from, to], "halfmove"}. Return the next {"rights", "ep", "halfmove"}: a king move removes both of its side's rights; any move from or onto h1/a1/h8/a8 removes the matching right; a pawn double step sets ep to the skipped square only when an enemy pawn stands beside the destination; the halfmove clock resets on pawn moves and captures, else increments. Empty rights render as "-".
Why this case matters
These updates decide whether castling and en passant are legal on later moves.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| king move clears both | {"ep": null, "halfmove": 4, "rights": "Qkq"} | {"ep": null, "halfmove": 4, "rights": "kq"} | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗