DartsBaseGame
Direct Subclass:
Provides all the logic to create multiplier games based on this class
Constructor Summary
Public Constructor | ||
public |
constructor(players: Player[], options: Object) Initializes a new instance of the |
Member Summary
Public Members | ||
public get |
currentPlayer: Player: * |
|
public get |
currentRound: Round: * |
|
public get |
|
|
public get |
|
|
public get |
throwsPerRound: number: * |
Method Summary
Public Methods | ||
public |
Adds a player to the game. |
|
public |
addPlayers(players: Player[]) Add multiple players to the game. |
|
public |
invalidateRound(round: Round) Invalidates specific round. |
|
public |
invalidateThrow(dartsThrow: Throw) Invalidates specific |
|
public |
nextPlayer(): Player Sets |
|
public |
Creates new instance of the |
|
public |
roundsByPlayer(player: Player): Round[] |
|
public |
Represents single |
|
public |
throwsByPlayer(player: Player): Throw[] |
Public Constructors
Public Members
Public Methods
public addPlayer(player: Player) source
Adds a player to the game.
Params:
Name | Type | Attribute | Description |
player | Player | Instance of |
public addPlayers(players: Player[]) source
Add multiple players to the game.
Params:
Name | Type | Attribute | Description |
players | Player[] | Array of players. |
public invalidateRound(round: Round) source
Invalidates specific round.
Params:
Name | Type | Attribute | Description |
round | Round |
|
public invalidateThrow(dartsThrow: Throw) source
Invalidates specific throw
.
Params:
Name | Type | Attribute | Description |
dartsThrow | Throw |
|
public roundsByPlayer(player: Player): Round[] source
Params:
Name | Type | Attribute | Description |
player | Player | Instance of the |