38 lines
No EOL
823 B
C++
38 lines
No EOL
823 B
C++
#ifndef CARDS_UTIL
|
|
#define CARDS_UTIL
|
|
|
|
#include <cstdio>
|
|
#include <cstdlib>
|
|
#include <iostream>
|
|
#include <cstring>
|
|
#include <vector>
|
|
#include <random>
|
|
#include <algorithm>
|
|
#include <time.h>
|
|
|
|
// enumerated definitions
|
|
typedef enum
|
|
{
|
|
FULLCARD = 0,
|
|
VALUE = 1,
|
|
SUIT = 2
|
|
} CardSwitch;
|
|
|
|
namespace Cards
|
|
{
|
|
//
|
|
class Card
|
|
{
|
|
public:
|
|
Card(char value, char suit);
|
|
int getCardValue();
|
|
char getCardRawValue();
|
|
char getCardSuit();
|
|
std::string getFullCard();
|
|
void switchComparison(CardSwitch switchComp = VALUE);
|
|
void switchInput(CardSwitch switchComp = FULLCARD);
|
|
void switchOutput(CardSwitch switchComp = FULLCARD);
|
|
friend bool operator==(const Card &cardOne, const Card &cardTwo);
|
|
};
|
|
}
|
|
#endif |