-
Notifications
You must be signed in to change notification settings - Fork 0
/
player.h
52 lines (48 loc) · 1.09 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#ifndef player_h
#define player_h
#include <vector>
#include <iostream>
#include <string>
#include <cstdlib>
#include <sstream>
#include "board.h"
class Board;
class Player{
static bool anyWin;
int vp;
int res[5]; //0Caff 1Lab 2Lec 3Stu 4Tut
std::vector<int> crit;
std::vector<int> goal;
std::string num2name(int);
int res2num(std::string);
std::string num2res(int);
public:
Player();
~Player();
static bool anyoneWin() {
return anyWin;
}
void addCrit(int);
void addGoal(int);
void addRes(int, int);
void printStatus(int);
void printCrit(Board *, int);
bool canBuildGoal();
void buildGoal();
bool canBuildAss();
void buildAss();
bool canImpMid();
void impMid();
bool canImpExam();
void impExam();
void getAforB(std::string, std::string);
void lost2geese(int);
bool notZeroRes();
void getRes(int);
void loseRes(int);
void stealBy(int, int, Player *);
void savePlayer(std::ofstream &);
int getVP();
void loadData(std::ifstream &, Board *, int);
};
#endif /* player_h */