MCPcopy Create free account
hub / github.com/SimHacker/micropolis / cityEvaluation

Method cityEvaluation

MicropolisCore/src/MicropolisEngine/src/evaluate.cpp:100–120  ·  view source on GitHub ↗

* Evaluate city * @todo Handle lack of voting explicitly */

Source from the content-addressed store, hash-verified

98 * @todo Handle lack of voting explicitly
99 */
100void Micropolis::cityEvaluation()
101{
102 //printf("cityEvaluation totalPop %d\n", totalPop);
103 if (totalPop > 0) {
104 short problemTable[PROBNUM]; // Score for each problem, higher the more severe the problem is.
105 for (int z = 0; z < PROBNUM; z++) {
106 problemTable[z] = 0;
107 }
108
109 getAssessedValue();
110 doPopNum();
111 doProblems(problemTable);
112 getScore(problemTable);
113 doVotes(); // How well is the mayor doing?
114 changeEval();
115 } else {
116 evalInit();
117 cityYes = 50; // No population => no voting. Let's say 50/50.
118 changeEval();
119 }
120}
121
122
123/**

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected