1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
#include <iostream>
#include "Card.h"
#include "DeckOfCards.h"
using namespace std;
const string Card::faceNames[ totalFaces ] = {"Ace", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten", "Jack", "Queen", "King"};
const string Card::suitNames[ totalSuits ] = {"Hearts", "Clubs", "Diamonds", "Spades"};
Card::Card( int cardFace, int cardSuit )
{
face = cardFace;
suit = cardSuit;
}
string Card::toString() const
{
return faceNames[ face ] + " of " + suitNames[ suit ];
}
|