Chain reaction, strategy game for 2-4 players
xchain [-v] [--version] [-h] [--help] [path to wish]
Rules of the game
Chain Reaction is played on an 8 by 8 board. Players take turns to move. On each move, the player may select an empty square, or one they already own. Squares belonging to other players may not be chosen. If the square was unowned, it becomes the property of the player, and is given a value of 1. If the square was owned by the player, the value is incremented.
If the value of a square ever exceeds the maximum permitted of that square, it explodes. Squares in the corner have a maximum of 1, squares touching an edge, but not on a corner have a maximum of 2, and squares in the interior have a maximum of 3.
When a square explodes, it becomes unowned, and it's value is reset to 0. The 4 squares touching it become owned by the owner of the exploding square, and their values are incremented. If any of these are above their maximum, they explode, giving rise to the chain reaction.
If, at the end of a move, any of the players have no squares, they are dead, and get no more turns. When there is only one person left, they are the winner.
Game options
On loading the game, a 2 player game with a blank board is loaded. To change this, edit the settings to suit, and click on "New Game". Clicking on this in the middle of a game will abandon it, and start a new one.
To select the number of players, click on the numbered radio buttons. To the right of these are entry boxes to fill in player names, if desired. The background to these shows the colour of the players' squares. Names and colours are only updated when "New Game" is clicked on. To the right of these, are counters of the number of squares belonging to each player.
If a shorter game is desired, squares can be set for the players before the game starts. This can be up to 4 rows and columns, or a random placement. For 2 players, up to 32 squares each may be chosen. For 3 players, up to 21 each, and for 4 players, up to 16 each.
Whoever goes first has quite an advantage. To offset this, a random first person can be chosen. On clicking "New game", the status bar below the board shows who this will be.
-h, --help
Show summary of options.
-v, --version
Show version of program.
path to wish
Chain Reaction requires the wish tcl/tk interpreter. By default it uses /usr/bin/wish (The default for Debian GNU/Linux, and most other Unix-like systems). Use this option to force a different location.
/usr/bin/wish
Default location of wish tcl/tk interpreter.
Not guaranteed to be free of potential buffer overflows. Do not use setuid, or with greater privilege than the players using it.
Network support.
A way to save game settings - either environment variables, or a settings file.
First seen many years ago on the (as it was then) Acorn Archimedes. Original author unknown. Written for Unix by Alistair Cunningham <[email protected]>
http://thor.cam.ac.uk/~ac212/xchain/