public function __construct($junior = false) { $this->callsign = (new \ReflectionClass($this))->getShortName(); $this->strenght = 1000; parent::__construct(spaceShip::$MILITARY, $junior); }
/** * 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; }