Again, I have rewritten one of my old games with JavaFX. This time I've created a JavaFX version of my old java swing game ColorPuzzle (yes I know, the name isn't very creative). The game mechanics are the same: You can switch the color of all fields under your control. Everytime you are switching the active color, all fields in the direct neighbourhood of your own fields with that same color are going under your control from now on. The goal is to bring all fields under your control with the fewest moves. Before you ask: Yes, the game idea is not my invention, there are many games of this type out there and my version is only a clone. I create games only because programming is fun and not to become the best game inventor :-) The code is available on github: https://github.com/lestard/ColorPuzzleFX.
Grid ComponentWhile the development of the game I have encapsulated the logic for manipulating and drawing the grid and extracted it into it's own component. This way I was able to reuse the grid logic for other projects like SnakeFX. You can view the code for this grid component on github too (https://github.com/lestard/Grid) but it's not intended for wide usage at the moment as documentation and testing far from production ready. It's more like a playground for me. In another post I will describe the idea behind the grid component in more detail.
MvvmFXAnother reason to build the game was to create a simple example for our own UI framework MvvmFX.