MarketToken Object

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

The MarketToken object describes a token that has been placed on the Stock Market.

Data Elements in Object
Element Type C Description
snumb int * Index number of token sheet object that contains this token
sheet object * Token sheet object that contains this token
index int * Index of token on token sheet
flip Boolean * True if token is flipped
stack int * Controls terminal stacking
bx int * X coordinate of token on stock market
by int * Y coordinate of token on stock market
hx int * X coordinate of price box containing this token
hy int * Y coordinate of price box containing this token
mtindex int Index of this token object in BD18.marketTokens array

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

Methods in Object

place(alpha) The place function places the token on the stock market (canvas2).

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