Implementation for iOS and Android by Manuel Siekmann. ChainReaction can be played with up to 4 players, on a grid of squares up to 8x8 (default 6x6). The aim of the game is to eliminate your opponents by exploding your bombs in order to convert theirs, without exposing yourself to counter-attacks.
Bombs will explode whenever there are too many of them in a square. This will happen with 2 bombs in a corner square, 3 on an edge, or 4 in any other. When the bombs in a cell explode, one bomb is added to each cell directly connected to the exploding cell, and bombs in these cells are converted to your colour. Any remaining bombs are left in the original cell (e.g. If a centre cell has 5 bombs, 1 will remain after the explosion). If this causes a neighbouring cell to reach its limit for the number of bombs it can hold, then it too will explode. In this way it is easy to produce large chain reactions which can sweep across the board.
Each turn a player may place one bomb in either a cell they control or an empty one, and a player is eliminated when there are no bombs of their colour remaining on the board.
Java NIO - simple implementation
Java NIO is the upcoming background technology for the Jabaco Winsock-Adapter. In this paper I'll show how to use this framework with a simple implementation of the game ChainReaction.