Tetravex is a small curses based puzzle game for Unix machines and people with way too much time on their hands (or possibly some fear of sleep).
The goal of tetravex is to properly place each of your squares on the board. Each square has 4 numbers, one on each side. A piece is in a legal position if each adjacent square has a matching number on its adjacent side. The game is best illustrated by a crappy ASCII art diagram. JPEG? Never heard of it, sorry!
+-----+ +-----+
| 3 | | 5 |
|7 2| |2 4|
| 1 | | 3 |
+-----+ +-----+
+-----+ +-----+
| 1 | | 3 |
|1 6| |6 0|
| 9 | | 1 |
+-----+ +-----+
These pieces are placed legally and would solve a 2x2 board.
You can download my first working version of tetravex here. Later revisions will (hopefully) make better use of subwindows. This program was a great exercise to learn Curses programming, so as I continue to learn, it will improve.
I've been meaning to test this code on more systems, but right now I've only compiled and run it on my laptop, which runs Mac OS X.2. It will probably run on most normal unix machines, though.
One feature I'd like to implement is a solver. You could ask the game to find (maybe) all possible solutions, which on a larger board might be more than 1. This might manifest itself as a "here are my squares, why don't you solve them" kind of problem, so of course a user would be allowed to enter their own squares.
Comments and questions, few as they may be, are always welcome at dave@redterror.net.