-
Notifications
You must be signed in to change notification settings - Fork 0
/
player.h
36 lines (30 loc) · 1.02 KB
/
player.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
32
33
34
35
36
#ifndef PLAYER_H
#define PLAYER_H
#include "deck.h" // Deck
class Player {
public:
// General Part
Player(string name = "PLAYER");
Deck hand() { return my_hand; }
Deck captured() { return my_captured; }
string name() { return my_name; }
void give_name(string name) { my_name = name; }
void get_card_to_my_hand(Card card) { my_hand.add(card); }
void get_card_to_my_captured(Card card) { my_captured.add(card); }
void operator=(const Player &player);
void play(Card::Rank special_rank);
int points(int people);
// Computer Part
void enable_computer() { computer = true; }
bool is_computer() { return computer; }
private:
Deck my_hand;
Deck my_captured;
string my_name;
bool computer;
// Subroutines for playing
void first_stage_pairing();
void second_stage_pairing();
bool second_stage_special_case_check(Card::Rank special_rank);
};
#endif // PLAYER_H