-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCard.cpp
More file actions
43 lines (36 loc) · 701 Bytes
/
Copy pathCard.cpp
File metadata and controls
43 lines (36 loc) · 701 Bytes
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
32
33
34
35
36
37
38
39
40
41
42
43
#include "Card.h"
#include <iostream>
#include <string.h>
using namespace std;
Card::Card(int a,int b)
{
suit=a;
face=b;
value=4*(face-1)+suit;
chosen=0;
}
void Card::setface(int a)
{
face=a;
}
void Card::setsuit(int a)
{
suit=a;
}
int Card::getface()
{
return face;
}
int Card::getsuit()
{
return suit;
}
string Card::facestring[]={"none","3","4","5","6","7","8","9","10","J","Q","K","A","2"};
string Card::suitstring[]={"none","Clubs","Diamonds","Hearts","Spades"};
string Card::toString()
{
string tmp=facestring[face]+" of "+suitstring[suit];
//strcat(tmp," of ");
//strcat(tmp,suitstring[suit]);
return tmp;
}