Class: Turn

Class: Turn

Turn

new Turn(id, order, seqId, player)

Represents a turn in a turn based game.

Parameters:
Name Type Description
id Number

The turn's id.

order Number

The turn's player order.

seqId Number

The turn's sequence id.

player Entity

The player associated with the turn.

Source:

Members

actions :Array

The array of Action executed in this turn.

Type:
  • Array
Source:
See:

id :Number

The turn's unique ID starting from 0.

Type:
  • Number
Source:

order :Number

The turn's player order, starting from 0, ends at number of players - 1.

Type:
  • Number
Source:

player :Entity

The turn's player, who is owner of the turn.

Type:
Source:

seqId :Number

The turn's sequence ID, starting from 0, increases by 1 when player order resets to 0.

Type:
  • Number
Source:

Methods

addAction(action)

Adds the Action to the Turn.

Parameters:
Name Type Description
action Action

The Action to add.

Source: