Reference Source
public class | source

Score

A score keeper for a single player and round.

Member Summary

Public Members
public

Method Summary

Public Methods
public

If points are positive, set points to 0.

public

decrease(points: number)

Decrease points by a number (sign ignored).

public

double()

Double points, even if negative.

public

increase(points: number)

Increase points by a number (sign ignored).

public

reset()

Reset points to 0.

Public Members

public points: number source

Public Methods

public bankrupt() source

If points are positive, set points to 0.

public decrease(points: number) source

Decrease points by a number (sign ignored).

Params:

NameTypeAttributeDescription
points number

number of points to decrease.

public double() source

Double points, even if negative.

public increase(points: number) source

Increase points by a number (sign ignored).

Params:

NameTypeAttributeDescription
points number

number of points to increase.

public reset() source

Reset points to 0.