* Returns the total amount of monthly costs * for maintaining the personnel in the base. * @return Maintenance costs. */
| 918 | * @return Maintenance costs. |
| 919 | */ |
| 920 | int Base::getPersonnelMaintenance() const |
| 921 | { |
| 922 | size_t total = 0; |
| 923 | total += _soldiers.size() * _rule->getSoldierCost(); |
| 924 | total += getTotalEngineers() * _rule->getEngineerCost(); |
| 925 | total += getTotalScientists() * _rule->getScientistCost(); |
| 926 | return total; |
| 927 | } |
| 928 | |
| 929 | /** |
| 930 | * Returns the total amount of monthly costs |
no test coverage detected