The Arimaa JavaScript game client can be placed on any web page using four SCRIPT tags in the BODY section of the web page. Here is an example:

The first SCRIPT tag loads in a file which contains variables that are usually fixed for the game client. These variables define such things as the names of the images for the game board, game pieces, the directory which contains the images, the size of the images, etc. The variables are stored in the global object call arimaa_prop. Click the link to see this file:
prop.js

The second SCRIPT tag loads in a file which also contains variables. These variables are specific to this instance and define such things as the name of the players, the move list, the side to view from, the title to be displayed, etc. These variables are stored in the global object called arimaa_vars. Click the link to see this file:
vars.js

The third SCRIPT tag allows additional variables to be add to the arimaa_vars object. Also it allows the variables to be changed from the values given in the vars.js file.

The fourth SCRIPT tag loads a file which defines a function called init() and then runs this function. The init() function creates an IFRAME in the document and loads the file arimaaClient.htm into the IFRAME. Click the link to see this file:
arimaaClient.js

Thus any web page can display the Arimaa game client by using the above mentioned BASE and SCRIPT tags.

Various parameters will be loaded into the arimaa_vars object from the vars.js file or from the web page itself. Based on these parameters the game client will operate accordingly.

The arimaa_vars.mode parameter determines the mode in which the game client operates. The value of the mode parameter can be either: replay, selfPlay, netPlay or netWatch. The meaning of other parameters depends on the mode parameter.

mode=replay Replay mode - this has already been implemented in phase 1

mode=selfPlay Self play mode - this needs to be implemented in phase 2 (this is the current development phase)

mode=netPlay Net play mode - this needs to be implemented in phase 3

mode=netWatch Net watch mode - this needs to be implemented in phase 4

Time Display