Difference between revisions of "MarketToken Object"

From BOARD18 Project WIKI
Jump to navigation Jump to search
(Initial version of this page)
 
(added mtindex)
 
(One intermediate revision by the same user not shown)
Line 29: Line 29:
| *
| *
| True if token is flipped
| True if token is flipped
|-
| stack
| int
| *
| Controls terminal stacking
|-
|-
| bx
| bx
Line 49: Line 54:
| *
| *
| Y coordinate of price box containing this token
| Y coordinate of price box containing this token
 
|-
| mtindex
| int
|
| Index of this token object in BD18.marketTokens array
|}
|}



Latest revision as of 15:15, 5 August 2013

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.