FAILURE MAP
← Case archive

FA-82470 / Chess move legality / Member archive

King retreats along the checking line · case 05

A king on e4 checked by a rook on e8 may step back to e3.

Member previewVariant 5 · 3 implementations · 8 checks per implementation

Case contract

Input: {"board", "from": king square, "to": square}. Return true when the king move is legal: exactly one square in any direction, not onto a friendly piece, and the destination is not attacked by the opponent (including the enemy king) once the king has left its origin square. Captures of undefended enemy pieces are allowed.

Why this case matters

Move validators gate every move in engines, servers and arbiters; accepting an illegal move or rejecting a legal one corrupts the game record.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
retreat along rook filetruefalseFailed

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 ↗