Class: Game

Checkers. Game

The simple version of American Checkers. An 8x8 board with 12 checkers on each side that must move diagonally to the opposing side until kinged.

new Checkers.Game()

Initializes a Game with basic logic as provided by the Creer code generator. Never use this directly. It is for internal Joueur use.

Extends

  • BaseGame

Members

number boardHeight

The height of the board for the Y component of a checker.

number boardWidth

The width of the board for X component of a checker.

Checkers.Checker checkerMoved

The checker that last moved and must be moved because only one checker can move during each players turn.

boolean checkerMovedJumped

If the last checker that moved jumped, meaning it can move again.

Array.<Checkers.Checker> checkers

All the checkers currently in the game.

Checkers.Player currentPlayer

The player whose turn it is currently. That player can send commands. Other players cannot.

number currentTurn

The current turn number, starting at 0 for the first player's turn.

Object.<string, Checkers.GameObject> gameObjects

A mapping of every game object's ID to the actual game object. Primarily used by the server and client to easily refer to the game objects via ID.

number maxTurns

The maximum number of turns before the game will automatically end.

string name

The name of the game.

Array.<Checkers.Player> players

List of all the players in the game.

string session

A unique identifier for the game instance that is being played.

number timeAddedPerTurn

The amount of time (in nano-seconds) added after each player performs a turn.