BoardTile Object

From BOARD18 Project WIKI
Jump to: navigation, search
This page describes a BOARD18 JavaScript object.
This object is created using the BoardTile constructor function.
Go to Object List. - Go to Design Document.

The BoardTile object describes a tile that has been placed on the board.

Data Elements in Object
Element Type C Description
snumb int * Index number of tile sheet object that contains this tile
sheet object * Tile sheet object that contains this tile
index int * Index of tile on tile sheet
rotation int * Rotation of displayed tile on board
bx int * X coordinate of hex containing this tile
by int * Y coordinate of hex containing this tile

An * in the "C" column indicates that the element is created by the constructor function.

Methods in Object

place(tmp) The place function places the tile on the board (canvas1).

togm() The togm function exports the boardTile as a JSON string.