Documentation

Card
in package

Classic playing card for blackjack.

Table of Contents

Constants

RANK_ACE  : int = 1
RANK_JACK  : int = 11
RANK_KING  : int = 13
RANK_QUEEN  : int = 12
SUITS  : array<string|int, mixed> = ['hearts', 'clubs', 'diamonds', 'spades']

Properties

$cardID  : int
$rank  : int

Methods

__construct()  : mixed
Create a specific card in the deck.
getCardID()  : int
getRankName()  : string
Returns the rank name of this card (of the 13 ranks).
getSuitName()  : string
getValue()  : int
Return the card's blackjack value.
isAce()  : bool

Constants

RANK_ACE

private int RANK_ACE = 1

RANK_JACK

private int RANK_JACK = 11

RANK_KING

private int RANK_KING = 13

RANK_QUEEN

private int RANK_QUEEN = 12

SUITS

private array<string|int, mixed> SUITS = ['hearts', 'clubs', 'diamonds', 'spades']

Properties

$cardID read-only

private int $cardID

$rank read-only

private int $rank

Methods

__construct()

Create a specific card in the deck.

public __construct(int $cardID) : mixed
Parameters
$cardID : int

getCardID()

public getCardID() : int
Return values
int

getRankName()

Returns the rank name of this card (of the 13 ranks).

public getRankName() : string
Return values
string

getSuitName()

public getSuitName() : string
Return values
string

getValue()

Return the card's blackjack value.

public getValue() : int
Return values
int

isAce()

public isAce() : bool
Return values
bool

        
On this page

Search results