source code was based on the board2diag tool.
First, one has to include the call to the board2diag.js file, in the following
version assumes all files are in the same directory (this is easily changed).
Just click on
to download the actual version.
The function has one argument, which is a string of the following form:
- Number of columns of the first row
- Number of columns of the maximal row
- Number of columns of the bottom row (this just be less than the previous
value, otherwise, it will printed just to the middle row - this is useful
for trapezoid boards)
- String that describes the position. Here:
- a / marks the end of a row
- a . is one empty square
- a ; is one empty cell marked with a green dot
- a : is one empty cell marked with a red dot
- a , is one empty cell marked with a blue dot
- to place stones, use 'xwopqstuv' for black, white, brown,
yellow, gray, blue, green, red, magenta. Use uppercase to mark them.
- to mark empty cell with numbers, use 'a' for 1, 'c' for 2, 'd' for 3'.
- a h is a special piece used to define walls, blocks, ... if you use H
it will blink!
- use number 1,2,3,4,5,6,7,8,9,0 to represent simple stacks of white or
- use [abc] to represent composite stacks, use 'e' empty tops, 'w' for
white stone, 'b' for black stone, and 'r' for red stone.
- use @a[direction] to draw arrows, direction are the typical n,w,s,e
and m,o,r,t for nw,ne,sw,se respectively.
- use @d[color][number] to draw dices. Available colors are w(hite) and
Version 0.6 - Dec 2003