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