Fkmines is Minesweeper sans GUI

By

The terminal window isn’t exactly a gold mine for games, but sometimes you’re stuck without a GUI and with time on your hands. That’s where German student Richard Molitor found himself. Bored, and wanting to enhance his programming skills, he created fkmines, a Minesweeper client using the ncurses library.

Molitor says, “The main difference from the original Minesweeper obviously is that fkmines is not controlled with a mouse (although mouse support could be implemented, but I’m not really interested in that). Instead, you move around using the vi key bindings – h j k l – plus some extras like G for the last line and $ for the last column. Also, instead of opening fields and marking mines by clicking, you use the spacebar and m.

“The other big difference is that the field of mines can be bigger than the terminal; that is, you can have a mine field with more rows and columns than your terminal has. One reason this is important is that xterm and the like can be resized, and I didn’t want fkmines to crash in that case. And some freak might want to solve a 500×500 mine field. Of course you cannot see all of the mine field at the same time then, but fkmines will scroll the field to keep your cursor visible.”

Because Minesweeper is relatively simple, fkmines is already essentially feature-complete, though Molitor has a few more tasks to take care of. “It will crash for big fields like 1000×1000; I’ll try and fix that when I find the time. Also, there’s no manpage yet; I’ll write one when I’ve got the syntax figured out :)). Of course, if fkmines gets any user requests for new features that seem reasonable to me and are not to hard to implement, I’ll try to implement them on some boring rainy day (November has plenty of them here).”

Molitor created fkmines in only a couple of days. “I wrote all the code in vim and use make and gcc for compilation. A friend of mine wondered if anyone would want to use the game, so I decided to find out” – and that’s how fkmines wound up on SourceForge.net.