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

Method getProblemVotes

MicropolisCore/src/MicropolisEngine/src/evaluate.cpp:552–560  ·  view source on GitHub ↗

* Return number of votes to solve the \a i-th worst problem. * @param i Number of the problem. * @return Number of votes to solve the \a i-th worst problem. * Returns \c -1 if such a problem does not exist. */

Source from the content-addressed store, hash-verified

550 * Returns \c -1 if such a problem does not exist.
551 */
552int Micropolis::getProblemVotes(int i)
553{
554 if (i < 0 || i >= CVP_PROBLEM_COMPLAINTS
555 || problemOrder[i] == CVP_NUMPROBLEMS) {
556 return -1;
557 } else {
558 return problemVotes[problemOrder[i]];
559 }
560}
561
562
563////////////////////////////////////////////////////////////////////////

Callers 2

handle_updateMethod · 0.80
drawContentMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected