MarketToken Object

From BOARD18 Project WIKI
Revision as of 11:34, 29 July 2013 by Rich (talk | contribs) (Initial version of this page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to 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
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

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.