A Card
is defined by its rank (see CardRank
) and suit (see CardSuit
).
More...
#include <card.h>
|
std::ostream & | operator<< (std::ostream &out, const Card &card) |
| Overload << to print a Card .
|
|
A Card
is defined by its rank (see CardRank
) and suit (see CardSuit
).
◆ Card()
◆ getCardValue()
int Card::getCardValue |
( |
| ) |
const |
Get the value of a Card
.
- Returns
- int
The value of a card is the value of its rank
- Returns
- int
◆ getRank()
Get the card's rank.
- Returns
- CardRank
◆ operator<<
std::ostream & operator<< |
( |
std::ostream & |
out, |
|
|
const Card & |
card |
|
) |
| |
|
friend |
Overload <<
to print a Card
.
- Parameters
-
- Returns
- std::ostream&
This function is declared as a friend of Card
so that we can directly access its private members: m_rank
and m_suit
.
The documentation for this class was generated from the following files: