Options
All
  • Public
  • Public/Protected
  • All
Menu

Class 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.

Hierarchy

  • BaseGame
    • Game

Implements

  • IBaseGame

Index

Properties

boardHeight

boardHeight: number

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

boardWidth

boardWidth: number

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

checkerMoved

checkerMoved: Checker | undefined

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

checkerMovedJumped

checkerMovedJumped: boolean

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

checkers

checkers: Checker[]

All the checkers currently in the game.

currentPlayer

currentPlayer: Player

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

currentTurn

currentTurn: number

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

gameObjects

gameObjects: object

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.

Type declaration

maxTurns

maxTurns: number

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

players

players: Player[]

List of all the players in the game.

session

session: string

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

timeAddedPerTurn

timeAddedPerTurn: number

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

Generated using TypeDoc