Create assignment four, commit the cards library that is currently a side project.
This commit is contained in:
parent
56e27589c0
commit
94ac292f32
5 changed files with 342 additions and 0 deletions
38
cards/cards.h
Normal file
38
cards/cards.h
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
#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
|
||||
Loading…
Add table
Add a link
Reference in a new issue