-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlayer_test15.cpp
More file actions
46 lines (34 loc) · 831 Bytes
/
Player_test15.cpp
File metadata and controls
46 lines (34 loc) · 831 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
44
45
46
#include <iostream>
#include <iomanip>
#include <string>
#include <cstring>
#include <cstdlib>
#include <cassert>
#include "Card.h"
#include "Deck.h"
#include "Hand.h"
#include "Player.h"
int main()
{
const char* counting = "counting";
Player *cplayer = player_factory(counting);
Hand chand;
Hand chand1;
Hand chand2;
//I added this comment line
Card c = Card(Card::ACE, Card::SPADES);
Card d = Card(Card::FIVE, Card::CLUBS);
Card f = Card(Card::SIX, Card::CLUBS);
Card g = Card(Card::TWO, Card::CLUBS);
Card e = Card(Card::FOUR, Card::SPADES);
chand.add_card(c);
chand.add_card(d);
chand1.add_card(c);
chand1.add_card(f);
chand2.add_card(c);
chand2.add_card(g);
assert(cplayer->draw(e, chand) == true);
assert(cplayer->draw(e, chand1) == true);
assert(cplayer->draw(e, chand2) == true);
return 0;
}