* Evaluate city * @todo Handle lack of voting explicitly */
| 98 | * @todo Handle lack of voting explicitly |
| 99 | */ |
| 100 | void 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 | /** |
nothing calls this directly
no outgoing calls
no test coverage detected