/
goverments.cpp
161 lines (114 loc) · 3.31 KB
/
goverments.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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
//ONLY place for variables that change per round
//ONLY Thocracy done 19.5.2014
#include <string>
#include <cstdio>
#include <iostream>
#include <math.h>
#include <cmath>
double Govermentmilitary(std::string Goverment){
//std::cout << "Goveverment = " << Goverment << std::endl;
if (Goverment == "Republic"){
// puts("Govermentmilitary returns 0.9");
return 0.90;
}
if (Goverment != "Dictatorship"){
// puts("Govermentmilitary returns 1");
return 1;
}
else {
//puts("Govermentmilitary returns 1.25");
return 1.25;
}
}
double GovermentPop(std::string Goverment){
// std::cout << "Goveverment = " << Goverment << std::endl;
if (Goverment == "Theocracy"){
// puts("GovermentPop returns 1");
return 1.5;
}
if (Goverment == "Fascism"){
return 0.85;
}
else {
// puts("GovermentPop returns 1.5");
return 1.0;
}
}
double GovermentIndustry(std::string Goverment)
{
//std::cout << "Goveverment = " << Goverment << std::endl;
if (Goverment != "Communisim"){
//puts("GovermentPop returns 1");
return 1.35;
}
else{
return 1.0;
}
}
double GovermentFarming(std::string Goverment){
//std::cout << "Goveverment = " << Goverment << std::endl;
if (Goverment == "Fascism"){
//puts("GovermentFarming returns 1.15");
return 1.15;
}
//puts("GovermentFarming returns 1.0");
return 1.0;
}
double GovermentOil(std::string Goverment){
//std::cout << "Goveverment = " << Goverment << std::endl;
if (Goverment == "Fascism"){
//puts("GovermentOil returns 1.75");
return 1.75;
}
//puts("GovermentOil returns 1.0");
return 1.0;
}
double Govermentspy(std::string Goverment){
std::cout << "Goveverment = " << Goverment << std::endl;
if (Goverment != "Dictatorship"){
// puts("Govermentspy returns 1");
return 1;
}
else {
puts("Govermentspy returns 1.30");
return 1.30;
}
}
double GovermentWeaponsTech(std::string Goverment, int points , int land){
//std::cout << "GovermentWeaponsTech, Goverment = " << Goverment << " points in weapons = " << points << " land is = " << land << std::endl;
double GvtTech = 1.0;
double GvtEff = 1.0;
double MaxTech = 1.5;
if (Goverment == "Democracy"){
MaxTech = 1.55;
}
if (Goverment == "Theocracy"){
MaxTech = 1.325;
}
// std::cout << " inside GovermentWeaponsTech " << std::endl;
if (Goverment == "Democracy"){
GvtTech = 1.1;
}
if (Goverment == "Theocracy"){
GvtTech = 0.65;
}
if (Goverment == "Communisim"){
GvtEff = 1.2;
}
//if (points != 0){
//std::cout << "points is not 0, this part of the code has not been player tested" << std::endl;
//}
// std::cout << "military tech (if this value is not 1.0, it has not been player tested yet=" << (1.0+(//MaxTech*GvtTech-1.00)*GvtTech*(exp(2.71828)-1.0*points/(780+5.75*land))) << std::endl;
//BaseTech%+(MaxTech%-BaseTech%)*GvtTech*(1-EXP(-GvtEff*TechPts/(C1+C2*Land)))
//puts("TODO");
return 1.0+(MaxTech-1.00)*GvtTech*(1.0-exp(-GvtEff*points/(780+5.75*land))) ;
}
double GovermentPCI(std::string Goverment){
//puts("Linie 115 Goorments.cpp");
//std::cout << "Goverment is=" << Goverment << std::endl;
if (Goverment == "Republic"){
//puts("GovermentmPCI 1.1");
return 1.10;
}
return 1.0;
}