-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCard.h
31 lines (22 loc) · 936 Bytes
/
Card.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*------------------------------------------------------------------------------------------------------------------------------------------
The class Card represents a playing card with a rank and suit, e.g "Queen of diamonds"
Card.h
Suits: 1 for spades, 2 for hearts, 3 for diamonds, 4 for clubs
Ranks: 1 for ace, 11 for jack, 12 for queen, 13 for king
Written for summer course in c++
2014 Anna Dunblad
------------------------------------------------------------------------------------------------------------------------------------------*/
#ifndef CARD_H
#define CARD_H
#include <iostream> //input/output
class Card{
public:
void setData(int _suit, int _rank); //set rank and suit of card
int getRank(); //return rank of card
void printCard(int printMethod); //print a card
Card(); //card with rank 0 and suit 0, aka "empty" card
private:
int rank;
int suit;
};
#endif