Reactor Solitaire

You can play Reactor here.

Sometime in my childhood I played a German solitaire card game on the family computer (a venerable Commodore Amiga 500). The play area was arranged in a 4x4 grid, with the edges being reserved for face cards. I don't remember much else about it, but decided to have a go at recreating it.

Reactor animation

For some reason I had quite a few German games on the Amiga. Half the fun was working out how to play - the instructions being completely indecipherable to me. I wanted to recreate this exploratory learning process on a small scale (hopefully without being too obtuse), which is part of the reason why I've made the graphics fairly abstract instead of sticking to the traditional 52 card deck appearance.

Empty board with ghosts

Rather than force feed the player a detailed rule list for how number and face cards act on the board (in English or German), I have tried to show through the imagery on each card. The border cards (face cards in the original) each have a single assigned position, and so have a unique image with matching ghost on the board.

Matched pair of cards

The number cards are removed from the board by matching with another number card to add up to a total of ten. An ace matches with a nine, a two matches an eight, three with a seven and so on. Since each value only matches one other value, I represented the numbers as matched pairs of cards.

Ten card

There are two special cases. The four 'ten' cards do not need another card to add up to ten, so are not part of a matched pair. The four 'five' cards are also special, in that they are the only card that needs to be matched with another card of the same value. If I revisit this game I'll need to work out a better way of representing this than the current 'bars' card as I don't feel it's obvious enough that it should be matched with itself.

Five bars card

I spent a little longer than I originally anticipated, running into some problems with my understanding of how openfl handles mouse picking for bitmaps (spoiler: it doesn't). So I rolled my own implementation which is more than sufficient for a simple card style game.