Skip to content

About

Full legal two-player pass-and-play chess built with SDL on Spinel

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Click Chess

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.

Requirements

  • Spinel (spin)
  • SDL3, statically linked via the sdl package — no brew install needed at build or run time

Install Spinel

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 -

Play

spin run click_chess

Or build first and run the binary directly:

spin build
./build/bin/click_chess

Rules implemented

Standard 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.

Controls

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

About

Full legal two-player pass-and-play chess built with SDL on Spinel

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages