예제 #1
0
 function __construct($data)
 {
     parent::__construct($data);
     if ($data) {
         $this->victoryPoints = $data->victory->victoryPoints;
     } else {
         $this->victoryPoints = array(0, 0, 0);
     }
 }
예제 #2
0
 function __construct($data)
 {
     parent::__construct($data);
     if ($data) {
         $this->movementCache = $data->victory->movementCache;
         $this->victoryPoints = $data->victory->victoryPoints;
     } else {
         $this->victoryPoints = array(0, 0, 0);
         $this->movementCache = new stdClass();
     }
 }
예제 #3
0
 function __construct($data)
 {
     parent::__construct($data);
     if ($data) {
         $this->movementCache = $data->victory->movementCache;
         $this->victoryPoints = $data->victory->victoryPoints;
         $this->headQuarters = $data->victory->headQuarters;
         if (isset($data->victory->histogram)) {
             $this->histogram = $data->victory->histogram;
             $turn = $data->gameRules->turn;
             if (!isset($this->histogram[$turn])) {
                 $this->histogram[$turn] = [0, 0, 0];
             }
         }
     } else {
         $this->victoryPoints = array(0, 0, 0);
         $this->movementCache = new \stdClass();
         $this->headQuarters = [];
         $this->histogram = [];
         $this->histogram[0] = [0, 0, 0];
     }
 }