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
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
intgetRankName()
Returns the rank name of this card (of the 13 ranks).
public
getRankName() : string
Return values
stringgetSuitName()
public
getSuitName() : string
Return values
stringgetValue()
Return the card's blackjack value.
public
getValue() : int
Return values
intisAce()
public
isAce() : bool