PEGS
Peg solitaire. Written in C by my father in 1991.
A 35-year-old MS-DOS binary, untouched, running in your browser. The original code my dad wrote on a PC in 1991 — the same game, the same prompts, the same satisfying click of pegs jumping over each other.
The game
▸ Boot the original 1991 MS-DOS binary in this browser tab.
js-dos runtime loads only when you click. Keyboard controls below.
How it plays
A board of 33 holes arranged in a plus-sign. 32 holes start filled with pegs; the center is empty. A move is a peg jumping over an adjacent peg into an empty hole — the jumped peg is removed. You win when one peg remains, ideally in the center.
The game prompts you for moves at the keyboard. Pick a peg by coordinate, pick a direction. Peg solitaire is harder than it looks; getting down to one peg in the center is the elegant solution.
The story
My father wrote this in C in 1991. Borland C, probably. He was teaching himself to program at the time — a classroom teacher who taught himself enough C to write small games for fun. PEGS was one of them.
I found the source files years later, archived on a 3.5" floppy that miraculously still read. The C compiles cleanly with a modern toolchain; the binary in this repo is the original from 1991. Both are checked in.
Run it locally
If you'd rather play it the old-fashioned way:
- Install DOSBox
- Mount the directory:
mount c: ~/path/to/PEGS c:PEGS3.EXE
Or download the binary directly: PEGS3.EXE (55KB).
Links
- github.com/zuchka/PEGS — source (C) + binary (EXE)
- Peg solitaire on Wikipedia — game theory, history, solved positions