Kakuro

JavaFX in Action has a Sudoku game, as an example of how to bind a user interface to a data (model) class. This Kakuro game is a step up in terms of difficulty, but just as addictive once you know the simple rules.

Most of the graphics in the game were built using Inkscape, and imported using JavaFX's FXD format. The game also uses a couple of embedded TrueType fonts, bundled as part of the Jar file.

To aid novice players, the game has an in-built tutorial, that actually wraps the real game UI component, and manipulates it show how the game works.

When running as an applet, or Web Start application, the game seems to suffer from a bug in JavaFX 1.2: short MP3s (sub one second) do not play. The buttons and the puzzle grid should make a noise, but this only works when the game is run directly from the local hard disk (ie, after being built). You'll note the scene graph glitches when the sounds are supposed to play, which doesn't happen when run directly from the hard disk — something, somewhere, is going wrong! :(

Instructions:
Arrow keys: navigate.
1 to 9: set digit.
0: clear digit.
SHIFT + 1 to 9: set/unset hint digit.
RMB (drag): pan puzzle.
CTRL + SHIFT + LMB (drag): drag to desktop.

Source code will be available soon.

Back