Class

BlackJackCard

BlackJackCard(suit, rank)

The card object

Constructor

# new BlackJackCard(suit, rank)

Parameters:
Name Type Description
suit string

the suit

rank string

the rank

View Source core/src/Games/BlackJack/Card.ts, line 9

Members

Array.<number>

# readonly ranks

All possible ranks

View Source core/src/Games/BlackJack/Card.ts, line 26

Array.<string>

# readonly suits

All possible suits

View Source core/src/Games/BlackJack/Card.ts, line 15

number

# value

Get the value

View Source core/src/Games/BlackJack/Card.ts, line 76

Array.<number>

# static readonly ranks

All possible ranks

View Source core/src/Games/BlackJack/Card.ts, line 102

Array.<string>

# static readonly suits

All possible suits

View Source core/src/Games/BlackJack/Card.ts, line 94

Methods

# rank() → {number}

The rank

View Source core/src/Games/BlackJack/Card.ts, line 126

number

# suit() → {string}

The suit

View Source core/src/Games/BlackJack/Card.ts, line 118

string

# toString() → {string}

Get the string prepresentation

View Source core/src/Games/BlackJack/Card.ts, line 133

string

# value() → {number}

Get the value

View Source core/src/Games/BlackJack/Card.ts, line 141

number

# static returnRandomCard(rngnullable) → {BlackJackCard}

Return a random card

Parameters:
Name Type Attributes Description
rng seedrandom.PRNG <nullable>

the random number generator

View Source core/src/Games/BlackJack/Card.ts, line 110

a card