Cleckers
A game of checkers for the Mac and Linux, in Dark and Light pieces on a board of black and gold. You play American checkers (English draughts) against the computer. It was built to try Humble UI, a desktop UI library for Clojure that draws everything itself with Skia: the board, the pieces and the buttons are all Humble UI components, and nothing is drawn by hand.

Getting it running
To play, download the zip from the latest release, open it, and drag Cleckers to your Applications folder. It needs an Apple-silicon Mac and nothing else, since Java is inside the app, and it opens without a security warning, since the app is signed and notarised. It was built and tested on macOS 27.2; earlier versions are untested.
On Linux, download Cleckers-<version>-linux-x64.tar.gz from the same release, unpack it, and run Cleckers/install.sh. That copies the app to ~/.local/share/cleckers and adds Cleckers to the desktop’s applications, with no root access; install.sh --uninstall removes it again, and Cleckers/bin/Cleckers runs it where it is. It needs an x64 machine with X11 or XWayland and nothing else, since Java is inside. It was built and tested on Fedora 45 with GNOME; other distributions are untested.
To run it from source, you need a JDK (developed with OpenJDK 27) and the Clojure CLI (1.12.7). It was developed on an Apple-silicon Mac and also runs on Linux (x64, under X11 or XWayland), where the window’s contents are zoomed to fit the window; packaging works on both. Humble UI runs on Windows too, which has not been tried.
git clone https://github.com/jonathanhuston/cleckers.git
cd cleckers
clojure -Srepro -M:run # the game in its window
clojure -Srepro -T:build package # Mac: target/dist/Cleckers.app; Linux: target/dist/Cleckers/ and a tar.gz of it
The first run fetches Humble UI from GitHub at a pinned commit, and Skia’s native libraries from Maven. -Srepro keeps a user-level deps.edn out of it.
An app built this way is signed only for the Mac that built it. Releasing describes the signed build.
Playing
Dark moves first, and you play Dark unless you choose otherwise. Your side is at the bottom of the board.
- Men move one square diagonally forward; kings move one square diagonally in any direction. A man that reaches the far row is crowned, and its move ends there.
- You capture by jumping a piece next to yours into the empty square beyond. If you can capture, you must, and a multiple jump has to be carried through to its end. When there is a choice of captures, any will do.
- A player who cannot move loses. The game is a draw when the same position comes up for the third time, or after 40 moves by each side with no capture and no man moved.
Move a piece either way: drag it to the square you want and let go, or click it to pick it up and then click the square. Clicking the piece in hand again, or anywhere it cannot go, puts it down; a piece dropped somewhere it cannot go returns to its square, still in hand. A dragged piece lands at once; a clicked one slides. A multiple jump is made one hop at a time, each hop dragged or clicked: after each hop the piece waits for the next.
- With Show moves on, as it is to begin with, a blue dot marks each square the piece in hand can go to, and when you have to capture, a blue ring marks each piece that can. With it off, the moves are the same without the marks; the piece in hand is still outlined.
- With Show moves on, the computer’s last move is outlined in blue until you pick up a piece. With it off, the computer just moves.
- Level runs from 1 to 5. Level 1 looks one move ahead, levels 2, 3 and 4 look three, five and eight, and level 5 looks as far as it can in two seconds.
- Undo takes back your last move and the computer’s reply, as many times as you like, and interrupts the computer if it is still thinking. In the middle of a multiple jump it goes back to the start of that move.
- You play switches sides and starts a new game.
| Keys | |
|---|---|
| New Game | N or ⌘N |
| Undo | U or ⌘Z |
| Show moves | M |
The level, your side and Show moves are remembered between launches. The game in progress and the window size are not. There is no menu bar of its own: Humble UI’s window library has none.
How it is built
src/cleckers/rules.clj |
the rules behind a small Rules protocol (start, legal moves, play, result, and the board between the hops of a jump), with American checkers as its one implementation |
src/cleckers/search.clj |
the computer: negamax with alpha-beta pruning, deepened one ply at a time, never stopping to judge a position in the middle of an exchange |
src/cleckers/logic.clj |
everything the app does, as one pure function from a state and an event to a new state and a list of effects |
src/cleckers/view.clj |
the window as a pure function of the state, in Humble UI components |
src/cleckers/main.clj |
the only impure part: the state, the effects, the clock that slides a piece, saved settings, the window |
A move is a path, not a square: where a piece starts, the squares it lands on, and the pieces it jumps. The rules decide what the board looks like between the hops of a multiple jump, so the rest of the program never has to know when a jumped piece leaves the board or when a crown appears.
Effects are data: start a search, cancel it, save the settings, send an event after so many milliseconds. main carries them out, so every rule of play, from a multiple jump entered hop by hop to undo during a search, is tested as a plain function, with time driven by hand. The search runs on a thread of its own, and an answer that arrives after an undo or a new game is dropped. Every change to the state is made on the window’s thread, because Humble UI’s signals are not safe to change from any other.
The board is a ui/grid of 64 squares, each a ui/mouse-listener that says when the mouse goes down on it and keeps track of which square the pointer is over. A piece is a stack of rounded ui/rects with an SVG crown for a king. A piece in motion is lifted out of the grid onto a layer above it and placed with ui/translate: a sliding piece follows a signal that a timer advances, and a dragged one follows a signal that ui/draggable sets to how far the mouse has moved. Only that one component is drawn again on each tick or movement. docs/humble-ui-notes.md says how Humble UI was to work with, and how it compares with the stacks tried before it.
Tests
clojure -Srepro -M:test
This tests the rules (including the number of positions reachable from the opening, to six plies, against the published figures), the search, the logic and the view. Humble UI can draw into a picture and take mouse events with no window, so the view’s tests draw every screen, click and drag on the real squares and buttons, and play whole games against the real search both ways.
clojure -Srepro -M:dev -m cleckers.shots # pictures of scripted positions in docs/screenshots/
clojure -Srepro -M:dev -m cleckers.play # whole games: clicked, dragged, and twenty computer against itself
clojure -Srepro -M:dev -m cleckers.bench # how fast the search is
clojure -Srepro -M:dev -m cleckers.frames # how smoothly a piece slides and drags, in the real window
clojure -Srepro -M:dev -m cleckers.dev --port 5555 # the window with a socket REPL; (cleckers.dev/reload)
Releasing
To open on other Macs without a warning, the app has to be signed with a Developer ID and notarised by Apple. With a “Developer ID Application” certificate in the keychain, and notary credentials stored once with xcrun notarytool store-credentials <profile>:
clojure -Srepro -T:build release \
:identity '"Developer ID Application: <Your Name> (<TEAMID>)"' \
:notary-profile '"<profile>"'
This signs the app and the two native libraries inside its jar, sends it to Apple, staples the ticket that comes back, and leaves target/dist/Cleckers-<version>-mac-arm64.zip. That zip is what a release carries.
On Linux, package leaves target/dist/Cleckers-<version>-linux-x64.tar.gz: unpack it anywhere and run Cleckers/bin/Cleckers, or run Cleckers/install.sh, which copies the folder to ~/.local/share/cleckers and adds Cleckers to the desktop’s applications (install.sh --uninstall removes both). Java is inside it, and nothing is signed.
Things worth knowing before changing it
- Humble UI is unfinished and has no manual. It is pinned to one commit in
deps.edn; the reference is its source, under~/.gitlibs/libs/io.github.humbleui/humbleui/. Examples on the web from 2022 and 2023 use an older API and are wrong for this commit. - Sizes in Humble UI are functions of a “container size” that is handed down the tree and is not the parent’s size.
docs/risk-check.mdexplains it, with the other things found out the hard way. - Clojure brings Swing with it.
jdepssays the app needs thejava.desktopmodule, but only Clojure’s own unused helpers do. The bundle leaves it out, which takes it from 91 MB to 70.
History and credits
Cleckers was written in December 2026 by Jonathan Huston, using Claude. It is one of a series of small board games written to try a way of building a Mac app, and this one runs on Linux too: Cléchecs (chess, with cljfx and JavaFX), Desdemona (Reversi, with Tauri and ClojureScript) and Iago (Reversi, in Racket) came before it. The colours are from his Qirkat.
The app is built on Clojure and Humble UI by Nikita Prokopov, which draws with Skija in a window from JWM. The search follows Desdemona’s.
Licence
Released under the MIT licence.