#include "Card.h" #include #include #include using namespace std; Card::Card() {} Card::Card(double c) { card = c; symbol = (int)c - 1; suit = (int)((c - (int)c) * 10 + 0.5) - 1; } string Card::getSuit() const { return St[suit]; } string Card::getSymbol() const { return Sl[symbol]; } void Card::print() const { cout << "Symbol: " << getSymbol() << endl << "Suit: " << getSuit() << endl; // cout << "Card: " << card << endl; // cout << "Symbol: " << symbol << endl; // cout << "Suit: " << suit << endl; } void Card::setCard(double v) { card = v; symbol = (int)card - 1; suit = (int)((card - (int)card) * 10 + 0.5) - 1; } double Card::getCard() const { return card; }