* Vote whether the mayor is doing a good job * @post #cityYes contains the number of 'yes' votes */
| 452 | * @post #cityYes contains the number of 'yes' votes |
| 453 | */ |
| 454 | void Micropolis::doVotes() |
| 455 | { |
| 456 | int z; |
| 457 | |
| 458 | cityYes = 0; |
| 459 | |
| 460 | for (z = 0; z < 100; z++) { |
| 461 | if (getRandom(1000) < cityScore) { |
| 462 | cityYes++; |
| 463 | } |
| 464 | } |
| 465 | } |
| 466 | |
| 467 | |
| 468 | /** Push new score to the user */ |
nothing calls this directly
no outgoing calls
no test coverage detected