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

Method doVotes

MicropolisCore/src/MicropolisEngine/src/evaluate.cpp:454–465  ·  view source on GitHub ↗

* Vote whether the mayor is doing a good job * @post #cityYes contains the number of 'yes' votes */

Source from the content-addressed store, hash-verified

452 * @post #cityYes contains the number of 'yes' votes
453 */
454void 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 */

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected