Full legal chess, local two-player pass-and-play, built with Spinel
and sdl — pieces are single-letter glyphs (no sprites),
board and highlights are fill_rect, moves are entirely mouse-driven.
- Spinel (
spin) - SDL3, statically linked via the
sdlpackage — nobrew installneeded at build or run time
With asdf:
asdf plugin add spinel https://github.com/jockofcode/asdf-spinel
asdf install spinel master
asdf set -u spinel master # make it the default (~/.tool-versions)Or build it from source:
git clone https://github.com/matz/spinel.git
cd spinel
make
export PATH="$PWD/bin:$PATH"
cd -spin run click_chessOr build first and run the binary directly:
spin build
./build/bin/click_chessStandard piece movement (pawns with two-square first move and diagonal capture, knights, bishops/rooks/queens with blocking, king one square), full check detection (a move is illegal if it leaves your own king attacked), and checkmate/stalemate detection ends the game.
Simplified on purpose: no castling, no en passant, and pawns reaching the back rank auto-promote to a queen (no promotion choice). These were left out to keep the rules engine focused and correct rather than sprawling into rarely-hit edge cases.
| Input | Action |
|---|---|
| Left click a piece | Select it — legal destinations highlight green (capture: red) |
| Left click a highlighted square | Move the selected piece there |
| Left click elsewhere | Deselect |
| R | Restart |
| Esc / Q | Quit |