WarpGoban include file

The goban creation macro

This include file declares the macro:

WarpGoban_CreateGoban(Kifu)

where the parameter is an array of strings, represeting a "kifu". The board will be created from it. The array should contain 19 strings, each string having 19 characters. If a character is 'X' a black stone will be placed at that location, and if a character is 'O' a white stone. Any other character will be ignored (and thus can be anything you like).

Here's an example array of an empty kifu definition (which you can copy into your code and fill with X's and O's as necessary):

#declare Kifu = array[19]
{ "+-----------------+", // T
  "|.................|", // S
  "|.................|", // R
  "|..,.....,.....,..|", // Q
  "|.................|", // P
  "|.................|", // O
  "|.................|", // N
  "|.................|", // M
  "|.................|", // L
  "|..,.....,.....,..|", // K
  "|.................|", // J
  "|.................|", // H
  "|.................|", // G
  "|.................|", // F
  "|.................|", // E
  "|..,.....,.....,..|", // D
  "|.................|", // C
  "|.................|", // B
  "+-----------------+", // A
// 1234567890123456789
};

The dimensions of the board are <42.1, -2, 45.6>. The macro centers the board about the origin.

The used textures can be overridden by #declaring any of the following texture identifiers before #including "WarpGoban.inc":

WarpGoban_BlackStoneMaterial
WarpGoban_WhiteStoneMaterial
WarpGoban_BoardWoodTexture
WarpGoban_LinesTexture

Declared objects

The include file also declares the following objects, which can be used separately:

WarpGoban_BlackStone
WarpGoban_WhiteStone
WarpGoban_Board
WarpGoban_Bowl (without stones)
WarpGoban_BlackBowl (with some black stones)
WarpGoban_WhiteBowl (with some white stones)
WarpGoban_BowlLid

The texture of the bowl can be overridden by #declaring the following texture identifier before #including "WarpGoban.inc":

WarpGoban_BowlTexture

The following macro can be used to more easily place stones on the WarpGoban_Board object (which has not been transformed yet). The CoordX and CoordZ parameters should have values between 1 and 19.

WarpGoban_StonePos(CoordX, CoordZ, Elevation)

The bowl creation macro

The following macro is also defined:

WarpGoban_CreateBowl(StoneObj, StoneAmnt, Seed)

This can be used to create a bowl with stones in it. (The stones may intersect each other, depending on the given seed.)