Backgammon via JavaScript