Documentation

Card
in package

Classic playing card for blackjack.

Table of Contents

Constants

RANK_ACE  = 1
RANK_JACK  = 11
RANK_KING  = 13
RANK_QUEEN  = 12
SUITS  = ['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 mixed RANK_ACE = 1

RANK_JACK

private mixed RANK_JACK = 11

RANK_KING

private mixed RANK_KING = 13

RANK_QUEEN

private mixed RANK_QUEEN = 12

SUITS

private 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