Source for file Player.php

Documentation is available at Player.php

  1. <?php
  2. /**
  3.  * Defines Player class.
  4.  *
  5.  * @package recAnalyst
  6.  * @version $Id: Player.php 17 2009-05-11 12:38:28Z biegleux $
  7.  * @author biegleux <biegleux[at]gmail[dot]com>
  8.  * @copyright copyright (c) 2008-2009 biegleux
  9.  * @license http://www.opensource.org/licenses/gpl-3.0.html GNU General Public License version 3 (GPLv3)
  10.  * @link http://recanalyst.sourceforge.net/
  11.  * @filesource
  12.  */
  13.  
  14. /**
  15.  * Class Player.
  16.  *
  17.  * Player implements a player in the game.
  18.  *
  19.  * @package recAnalyst
  20.  */
  21. class Player
  22. {
  23.     /**
  24.      * Player's name.
  25.      *
  26.      * @var string 
  27.      */
  28.     public $name;
  29.  
  30.     /**
  31.      * Player's index.
  32.      *
  33.      * @var int 
  34.      */
  35.     public $index;
  36.  
  37.     /**
  38.      * Defines if the player is a human.
  39.      *
  40.      * @var bool 
  41.      */
  42.     public $human;
  43.  
  44.     /**
  45.      * Defines player's team index (0 = no team has been set).
  46.      *
  47.      * @var int 
  48.      */
  49.     public $team;
  50.  
  51.     /**
  52.      * Defines if player is an owner of the game.
  53.      *
  54.      * @var bool 
  55.      */
  56.     public $owner;
  57.  
  58.     /**
  59.      * Player's civilization.
  60.      *
  61.      * @var string 
  62.      */
  63.     public $civ;
  64.  
  65.     /**
  66.      * Id of player's civilization.
  67.      *
  68.      * @var int 
  69.      */
  70.     public $civId;
  71.  
  72.     /**
  73.      * Id of player's color.
  74.      *
  75.      * @var int 
  76.      */
  77.     public $colorId;
  78.  
  79.     /**
  80.      * Indicates if the player is cooping in the game.
  81.      *
  82.      * @var bool true if player coops, otherwise false
  83.      */
  84.     public $isCooping;
  85.  
  86.     /**
  87.      * Player's feudal time (in ms, 0 if hasn't been reached).
  88.      *
  89.      * @var int 
  90.      */
  91.     public $feudalTime;
  92.  
  93.     /**
  94.      * Player's castle time (in ms).
  95.      *
  96.      * @var int 
  97.      */
  98.     public $castleTime;
  99.  
  100.     /**
  101.      * Player's imperial time (in ms).
  102.      *
  103.      * @var int 
  104.      */
  105.     public $imperialTime;
  106.  
  107.     /**
  108.      * Player's resign time (in ms) or 0 if player hasn't been resigned.
  109.      *
  110.      * @var int 
  111.      */
  112.     public $resignTime;
  113.  
  114.     /**
  115.      * An array of player's researches.
  116.      * An associative array containing "research id - time of research" pairs.
  117.      *
  118.      * @var array 
  119.      */
  120.     public $researches;
  121.  
  122.     /**
  123.      * Constructor.
  124.      *
  125.      */
  126.     public function __construct ()
  127.     {
  128.          $this->name = '';
  129.          $this->index = -1;
  130.          $this->human = false;
  131.          $this->team = -1;
  132.          $this->owner = false;
  133.          $this->civ = '';
  134.          $this->civId = 0;
  135.          $this->colorId = -1;
  136.          $this->isCooping = false;
  137.  
  138.          $this->feudalTime = 0;
  139.          $this->castleTime = 0;
  140.          $this->imperialTime = 0;
  141.          $this->resignTime = 0;
  142.  
  143.          $this->researches = array ();
  144.     }
  145. }
  146. ?>

Documentation generated on Mon, 11 May 2009 16:43:36 +0200 by phpDocumentor 1.4.1