Board18Market7

From BOARD18 Project WIKI
Revision as of 13:18, 27 October 2014 by Rich (talk | contribs) (added all check for update functions)
Jump to navigation Jump to search

board18Market7.js contains all the functions that implement the keyboard shortcut events.

Function setUpKeys

The setUpKeys function performs all of the bind operations for the keyboard shortcut events.

Keyboard Shortcuts
KEY Action
Enter Accept Move
C Cancel Move
M Goto Stock Chart
F Flip Token
L Move Left One Box
R Move Right One Box
U Move Up One Box
D Move Down One Box

Function checkForUpdateCallback(resp)

The checkForUpdateCallback function is the callback function for the checkForUpdate function. It acts on the status returned by the checkForUpdate.php AJAX call.

Function checkForUpdate()

The checkForUpdate function does an AJAX post call for checkForUpdate.php passing the gameid.

Function delayCheckForUpdate()

The delayCheckForUpdate function waits 2 minutes before calling the checkForUpdate function.

Function resetCheckForUpdate()

The resetCheckForUpdate function stops any current setTimeout for the checkForUpdate function and then calls the delayCheckForUpdate function.