Player
A player in the WOJ game.
Constructor Summary
Public Constructor | ||
public |
constructor(id: number, name: string) |
Member Summary
Public Members | ||
public |
|
|
public |
|
|
public get |
totalScore: numbner |
Method Summary
Public Methods | ||
public |
addToken() Adds 1 token to the player's tokens. |
|
public |
Return the score for a given round number. |
|
public |
hasToken(): * Checks if the player has any tokens. |
|
public |
resetScore(round: number) Reset score for round to 0. |
|
public |
Sets the player's tokens to 0. |
|
public |
Deduct a token, if the player has one. |
Public Constructors
Public Members
public get totalScore: numbner source
Public Methods
public getScore(round: number): number source
Return the score for a given round number.
Params:
Name | Type | Attribute | Description |
round | number | number of the round, 0 is round 1. |
public hasToken(): * source
Checks if the player has any tokens.
Return:
* | true if the player has at least one token. |