* Returns the total amount of living quarters * available in the base. * @return Living space. */
| 541 | * @return Living space. |
| 542 | */ |
| 543 | int Base::getAvailableQuarters() const |
| 544 | { |
| 545 | int total = 0; |
| 546 | for (std::vector<BaseFacility*>::const_iterator i = _facilities.begin(); i != _facilities.end(); ++i) |
| 547 | { |
| 548 | if ((*i)->getBuildTime() == 0) |
| 549 | { |
| 550 | total += (*i)->getRules()->getPersonnel(); |
| 551 | } |
| 552 | } |
| 553 | return total; |
| 554 | } |
| 555 | |
| 556 | /** |
| 557 | * Returns the amount of stores used up by equipment in the base, |
no test coverage detected