function stopDeploying(MovableUnit $unit) { /* @var Unit $unit */ if ($unit->unitIsDeploying() == true) { if ($unit->setStatus(STATUS_CAN_DEPLOY) == true) { $this->anyUnitIsMoving = false; $this->movingUnitId = NONE; $this->moves = new stdClass(); } } }