// Javascript Dynamic HTML Backgammon 1.1
// Author: Thomas Weibel, 4102 Binningen, Switzerland
// Copyright (c) www.thomasweibel.ch, all rights reserved
var i, j, a, b, help, imageNumber, images, picture, pits, pos, marked, double, finished, separated, markPit, markNum, dice, diceUsed, computerMove, computerEndgame, computerOutdice, playerMoveMade, playerEndgame, playerOutdice, cover, message, controls, moveHistory, dieOne, dieTwo, displayDice, menu, display, pipblack, pipwhite;
help=[' ','You control the white stones. The object of the game is to move all your pieces from the top-left corner of the board clockwise to the bottom-left corner and then off the board, while your opponent does the same in the opposite direction. Click on the dice to roll, click on a stone to select it, and again on a game space to move it. Each die result tells you how much you can move one piece, so if you roll a five and a three, you can move one piece five spaces, and another three spaces. Or, you can move the same piece three, then five spaces (or vice versa). Rolling doubles allows you to make four moves instead of two. Note that you can\'t move to spaces occupied by two or more of your opponent\'s pieces, and a single piece without at least another ally is vulnerable to being captured. Therefore it\'s important to try to keep two or more of your pieces on a space at any time. The strategy comes from attempting to block or capture your opponent\'s pieces while advancing your own quickly enough to clear the board first.