* Returns the amount of space in use by * soldiers and vehicles. * @return Space used. */
| 837 | * @return Space used. |
| 838 | */ |
| 839 | int Craft::getSpaceUsed() const |
| 840 | { |
| 841 | int vehicleSpaceUsed = 0; |
| 842 | for (std::vector<Vehicle*>::const_iterator i = _vehicles.begin(); i != _vehicles.end(); ++i) |
| 843 | { |
| 844 | vehicleSpaceUsed += (*i)->getSize(); |
| 845 | } |
| 846 | return getNumSoldiers() + vehicleSpaceUsed; |
| 847 | } |
| 848 | |
| 849 | /** |
| 850 | * Returns the total amount of vehicles of |
no test coverage detected