OnHex Object
Revision as of 10:33, 4 June 2013 by Rich (talk | contribs) (Rich moved page OnHex to OnHex Object: It's an object.)
This page describes a BOARD18 JavaScript object. |
This object is created using the OnHex constructor function. |
Go to Object List. - Go to Design Document. |
The OnHex object describes all items [tile and tokens] on the hex with the supplied coordinates.
Element | Type | C | Description |
---|---|---|---|
hexX | int | * | X coordinate of hex |
hexY | int | * | Y coordinate of hex |
tile | object | * | BoardTile object |
tile.btindex | int | * | index of tile in BD18.boardTiles array |
tokens | array | * | Array of BoardToken objects |
tokens[i].btindex | int | * | index of tokens[i] in BD18.boardTokens array |
isTile | boolean | * | True if there is a tile on the hex |
noToken | boolean | * | True if there is no token on the hex |
oneToken | boolean | * | True if there is one token on the hex |
manyTokens | boolean | * | True if there are many tokens on the hex |
manyItems | boolean | * | True if there are many items on the hex |
An * in the "C" column indicates that the element is created by the OnHex constructor function.
This object has no methods.