-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGod.h
More file actions
57 lines (52 loc) · 1.8 KB
/
God.h
File metadata and controls
57 lines (52 loc) · 1.8 KB
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
53
54
55
56
57
#ifndef GOD_H_INCLUDED
#define GOD_H_INCLUDED
#include "Player.h"
#include <vector>
class God : public Player {
protected:
bool is_day;
int mafia_ct;
int citizen_ct;
int no_of_players;
const int game_id;
std::vector<Player *> players;
std::vector<int> highest_votes;
std::vector<int> second_highest_votes;
public:
God(int game_ID);
God(const God &cpy);
~God();
//Setters
void SetDay(bool day) {is_day = day;}
void SetMafiaCt(int ct) {mafia_ct = ct;}
void SetCitizenCt(int ct) {citizen_ct = ct;}
void SetNoOfPlayers(int n) {no_of_players = n;}
//void SetPlayers(std::vector<int> plyers) {players = plyers;}
void SetHighestVotes(std::vector<int> ht_votes) {highest_votes = ht_votes;}
void SetSecondHtVotes(std::vector<int> sht_votes) {second_highest_votes = sht_votes;}
//Getters
int GetGameId() const {return game_id;}
int GetDay() const {return is_day;}
int GetMafiaCt() const {return mafia_ct;}
int GetCitizenCt() const {return citizen_ct;}
int GetNoOfPlayers() const {return no_of_players;}
Player *GetPlayerByIndex(int ind) const {return players[ind];}
std::vector<int> GetHighestVotes() const {return highest_votes;}
std::vector<int> GetSecondHighestVotes() const {return second_highest_votes;}
void ClearVotes() {
highest_votes.clear();
second_highest_votes.clear();
}
//Additional Functions
Player *GetPlayerById(int id);
int GetIdByPlayerName(std::string name);
void GetMafiasByIds(std::vector<int> &mafias);
int GetHealerById();
int GetDetectiveById();
void AddPlayer(Player *pl) {players.push_back(pl);}
void DecrementMafiaCt() {mafia_ct--;}
void DecrementCitizenCt() {citizen_ct--;}
void Kill(int id);
void Heal(int id);
};
#endif // GOD_H_INCLUDED