* Returns the amount of laboratories used up * by research projects in the base. * @return Laboratory space. */
| 659 | * @return Laboratory space. |
| 660 | */ |
| 661 | int Base::getUsedLaboratories() const |
| 662 | { |
| 663 | const std::vector<ResearchProject *> & research (getResearch()); |
| 664 | int usedLabSpace = 0; |
| 665 | for (std::vector<ResearchProject *>::const_iterator itResearch = research.begin (); |
| 666 | itResearch != research.end (); |
| 667 | ++itResearch) |
| 668 | { |
| 669 | usedLabSpace += (*itResearch)->getAssigned (); |
| 670 | } |
| 671 | return usedLabSpace; |
| 672 | } |
| 673 | |
| 674 | /** |
| 675 | * Returns the total amount of laboratories |
no test coverage detected