/**
  * Dumps player state.
  */
 public function dump_state()
 {
     // There is no validation function available here.
     echo BaseGame::get_milliseconds() . '<br />';
     echo 'Player HP: ' . $this->health_current . ' / ' . $this->health_max;
     echo '    Player AP: ' . $this->suitpower_current . ' / ' . $this->suitpower_max;
     echo '<br />';
     $this->inv_player->dump_inventory();
 }
Beispiel #2
0
 function Game($object = null)
 {
     $this->minPlanets = 25;
     $this->maxPlanets = 35;
     $this->numSectors = 9;
     $this->sectorSize = 20;
     $this->minMoney = 5000;
     $this->maxMoney = 6000;
     parent::__construct($object);
 }
 function Game($object = null)
 {
     parent::__construct($object);
 }
Beispiel #4
0
 /**
  * Returns a peer instance associated with this om.
  *
  * Since Peer classes are not to have any instance attributes, this method returns the
  * same instance for all member of this class. The method could therefore
  * be static, but this would prevent one from overriding the behavior.
  *
  * @return     GamePeer
  */
 public function getPeer()
 {
     if (self::$peer === null) {
         self::$peer = new GamePeer();
     }
     return self::$peer;
 }
Beispiel #5
0
 public static function model($className = __CLASS__)
 {
     return parent::model($className);
 }