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

Method getProblemNumber

MicropolisCore/src/MicropolisEngine/src/evaluate.cpp:535–543  ·  view source on GitHub ↗

* Return the index of the \a i-th worst problem. * @param i Number of the problem. * @return Index into the #problemOrder table of the \a i-th problem. * Returns \c -1 if such a problem does not exist. */

Source from the content-addressed store, hash-verified

533 * Returns \c -1 if such a problem does not exist.
534 */
535int Micropolis::getProblemNumber(int i)
536{
537 if (i < 0 || i >= CVP_PROBLEM_COMPLAINTS
538 || problemOrder[i] == CVP_NUMPROBLEMS) {
539 return -1;
540 } else {
541 return problemOrder[i];
542 }
543}
544
545
546/**

Callers 2

handle_updateMethod · 0.80
drawContentMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected