Gomoku Tools
This is a library to simplify common operation with gomoku board.
The plan is to make it work for renju and gomoku games, as well as with any other mnk game.
This library is currently in a very rough condition and a lot of things will get changed eventually.
Example:
This example works with 3x3 version of the game, but
var tools = ; var game = ; console; /* A B C 3 2 1 */ game; console; /* A B C 3 2 x 1 */ game; console; /* A B C 3 o 2 x x 1 o x */ gametransform; console; /* A B C 3 o x o 2 x 1 x */ gametransform; console; /* A B C 3 o 2 x x 1 o x */ gametransform; console; /* A B C 3 o x 2 x x 1 o */ gametransform; console; /* A B C 3 x o 2 x x 1 o */ gametransform; console; /* A B C 3 o x o 2 x 1 x */ gametransform; console; /* A B C 3 x o 2 x x 1 o */ gametransform; console; /* A B C 3 x 2 x 1 o x o */ gametransform; console; /* A B C 3 o x 2 x x 1 o */ gametransform; console; /* A B C 3 x 2 x 1 o x o */ gametransform; gametransform; gametransform; console; /* A B C 3 x 2 x 1 o x o */
All the methods above will work with gomoku version as well:
var tools = ; var game = ;
Tests
Run tests: nmp test