Exemple #1
0
 public function __construct($junior = false)
 {
     $this->callsign = (new \ReflectionClass($this))->getShortName();
     $this->strenght = 1000;
     parent::__construct(spaceShip::$MILITARY, $junior);
 }
Exemple #2
0
 /**
  * Compare ships by type
  * @param \bos\spaceShip $a
  * @param \bos\spaceShip $b
  * @return type
  */
 public static function cmpByType(spaceShip $a, spaceShip $b)
 {
     if ($a->getType() != $b->getType()) {
         return $a->getType() < $b->getType() ? -1 : 1;
     }
     return 0;
 }