| 350 | } |
| 351 | |
| 352 | int UnitInterface::getSpaceRemaining() const |
| 353 | { |
| 354 | int space = this->getType().spaceProvided(); |
| 355 | |
| 356 | // Decrease the space for each loaded unit |
| 357 | for (auto &u : getLoadedUnits()) |
| 358 | space -= u->getType().spaceRequired(); |
| 359 | |
| 360 | return std::max(space, 0); |
| 361 | } |
| 362 | //--------------------------------------------- ATTACK MOVE ------------------------------------------------ |
| 363 | bool UnitInterface::attack(Position target, bool shiftQueueCommand) |
| 364 | { |
no test coverage detected