1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
#include <iostream>
#include <cstring>
#include "Card.h"
using namespace std;
Card::Card(int f, int s)
{
face = f;
suit = s;
}
string Card::suits[4] = { "DIAMONDS", "CLUBS", "HEARTS", "SPADES" };
string Card::faces[13] = { "ACE", "TWO", "THREE", "FOUR", "FIVE", "SIX", "SEVEN", "EIGHT", "NINE",
"TEN", "JACK", "QUEEN", "KING" };
string Card::toString()
{
return faces[face] + " of " + suits[suit];
}
|