-
Notifications
You must be signed in to change notification settings - Fork 0
/
game.cpp
115 lines (97 loc) · 2.45 KB
/
game.cpp
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
#include "game.h"
#include "player.h" //do not include in game.h because player.h already includes game.h
Game::Game()
{
dayDiscussionTime = dayVotingTime = nightTime = 30000;
nightCount = 0;
revealRolesAfterDeath = true;
gunnerShots = 2;
}
void Game::dayBegin()
{
daytime = day;
//foreach Player votesFor = 0 && jailed = false && enchanted = false
//foreach(Player *player in Player)
//set canShoot = true for all gunners
//set canEnchant = true for all shamans
//if (sectLeader->alive) {sectLeader->getAdds()->setSectMember(true);}
//if (serialKiller->alive) {
////check if protected first
//serialKiller->getKills()->die(other)} //Kill option
//if (witch->alive) {
// switch (witch->getCurrentPotion()) {
// case deathPotion:
// witch->getTarget()->die(other);
// break;
// case shieldPotion:
//
// break;
// }
//}
}
void Game::nightbegin() //will be executed from first night and onwards
{
daytime = night;
//foreach Player votesFor = 0
//set canKill = true for all serialKillers
//set canCheck = true for all seers
//if (shaman->alive) {shaman->getEnchants()->setEnchanted(true);}
//create seperate chat instance between jailer and jailer->getProtects(), give jailer ability to kill imprisoned person //Kill option
nightCount++; //first night will be 1 if integer initialized with value 0 -> no interferences with blocking witch from using death potion during the first night
}
int Game::getDayDiscussionTime() const
{
return dayDiscussionTime;
}
void Game::setDayDiscussionTime(int value)
{
dayDiscussionTime = value;
}
int Game::getDayVotingTime() const
{
return dayVotingTime;
}
void Game::setDayVotingTime(int value)
{
dayVotingTime = value;
}
int Game::getNightTime() const
{
return nightTime;
}
void Game::setNightTime(int value)
{
nightTime = value;
}
int Game::getNightCount() const
{
return nightCount;
}
void Game::setNightCount(int value)
{
nightCount = value;
}
bool Game::getRevealRolesAfterDeath() const
{
return revealRolesAfterDeath;
}
void Game::setRevealRolesAfterDeath(bool value)
{
revealRolesAfterDeath = value;
}
enum Game::daytime Game::getDaytime() const
{
return daytime;
}
void Game::setDaytime(const enum daytime &value)
{
daytime = value;
}
int Game::getGunnerShots() const
{
return gunnerShots;
}
void Game::setup()
{
//foreach (*Player, Rplayer) {
}