/** * @param bool $useShortFormat * @return string */ public function getNameAndSpecs($useShortFormat = false) { $val = parent::getNameAndSpecs($useShortFormat); $val .= ' (Rebel) '; return $val; }
/** * @param AbstractShip $ship * @return bool */ private function didJediDestroyShipUsingTheForce(AbstractShip $ship) { $jediHeroProbability = $ship->getJediFactor() / 100; return mt_rand(1, 100) <= $jediHeroProbability * 100; }
public function __construct($name) { parent::__construct($name); // randomly put this ship under repair $this->underRepair = mt_rand(1, 100) < 30; }
public function __construct($name) { parent::__construct($name); $this->underRepair = mt_rand(1, 100) < 30; }