
Try creating a bigger game grid, such as M-10 M-x 5x5, and then run one of the crack commands below. So what I like about this game is that it comes with a very complex solver – really, you should read the source code with M-x find-library RET 5x5 – and a “cracker” that attempts to brute force solutions to the game.

It uses Emacs’s very own, and very cool, symbolic RPN calculator M-x calc (and in Fun with Emacs Calc I use it to solve a simple problem.) What makes this game interesting is its rather complex ability to suggest the next move and attempt to solve the game grid. To play, type M-x 5x5, and with an optional digit argument you can change the size of the grid. The 5x5 game is a logic puzzle: you are given a 5x5 grid with a central cross already filled-in your goal is to fill all the cells by toggling them on and off in the right order to win. And when you exit the Hanoi buffer or type a character you are treated to a sarcastic goodbye message (see above.) 5x5 There are a few Customize options ( M-x customize-group RET hanoi RET) such as enabling colorized discs. The Tower of Hanoi implementation in Emacs dates from the mid 1980s - an awful long time ago indeed. In Emacs there are three commands you can run to trigger the Tower of Hanoi puzzle: M-x hanoi with a default of 3 discs M-x hanoi-unix and M-x hanoi-unix-64 uses the unix timestamp, making a move each second in line with the clock, and with the latter pretending it uses a 64-bit clock. The Tower of Hanoi is an ancient mathematical puzzle game and one that is probably familiar to some of us as it is often used in Computer Science as a teaching aid because of its recursive and iterative solutions. Emacs is Serious Business now in a way that it probably wasn’t back in the 1980s when some of these games were written.

What they all have in common is a whimsy and a casualness that I rarely see in Emacs today.

The only thing they have in common is that most of them were added a long time ago: some are rather odd inclusions (as you’ll see below) and others were clearly written by bored employees or graduate students. Some you have probably heard of or played before. Why not play Emacs’s Zork-like text adventure game to take your mind off the tedium of work?īut seriously, yes, there are both games and quirky playthings in Emacs. It’s yet another Monday and you’re hard at work on those TPS reports for your boss, Lumbergh.
