Here is the result of a few nights’ worth of hacking. This project was originally my solution to an exercise I had posed to my functional programming students. Since then, I’ve rewritten it once and redesigned the user interface completely.
It’s an idealized implementation of a game we used to play during breaks at school. We would take a sheet of cross-ruled paper and play tic-tac-toe, with the following two changes: the whole sheet was allowed as the board, and we required a sequence of five, not three, marks for a win. The ideal was that the “board” was infinite, or unbounded, though in practice we did take the paper’s edges as the board’s bounds. (We also usually played more than one game on the same sheet of paper; previous games were simply declared “no-man’s land”, effectively creating weirdly shaped “holes” in the game board; I haven’t duplicated that here.)
Version 1.1 implements a single-player mode (the other player is simulated) and a demo mode (the program simulates both players). It’s written in Haskell, and requires gtk2hs 0.9.10 (or later) with Cairo enabled, and GTK+ 2.8 (or later). The source is available as release tarballs and as a darcs repository.
(Yes, I know that the arrow in the lower-left corner is wrong. That’s not my bug, though.)