/** * Boost * @param UnitInterface $unit * @return void * @throws BoostUnitException */ public function boostUnit(UnitInterface $unit) { if (!$unit instanceof Player) { throw new BoostUnitException('Boost card can be applied only to player'); } $unit->getData()->addPoints($this->mp); }
/** * Do damage * * @param interfaces\UnitInterface $unit * @param $damage */ public function damage(UnitInterface $unit, $damage) { $unit->receiveDamage($damage); }