1 | <?php |
||
20 | class PlayerRanking { |
||
21 | # set number of player before you (remove 1) in rank view |
||
22 | const PREV = 4; |
||
23 | # set number of player after you in rank view |
||
24 | const NEXT = 8; |
||
25 | # PREV + NEXT |
||
26 | const STEP = 12; |
||
27 | # set number of player on ajax load page |
||
28 | const PAGE = 10; |
||
29 | |||
30 | # attributes |
||
31 | public $id; |
||
32 | public $rRanking; |
||
33 | public $rPlayer; |
||
34 | |||
35 | /** @var Player **/ |
||
36 | protected $player; |
||
37 | |||
38 | public $general; # pts des bases + flottes + commandants |
||
39 | public $generalPosition; |
||
40 | public $generalVariation; |
||
41 | |||
42 | public $experience; # experience |
||
43 | public $experiencePosition; |
||
44 | public $experienceVariation; |
||
45 | |||
46 | public $butcher; # destroyedPEV - lostPEV |
||
47 | public $butcherDestroyedPEV; |
||
48 | public $butcherLostPEV; |
||
49 | public $butcherPosition; |
||
50 | public $butcherVariation; |
||
51 | |||
52 | public $trader; # revenu total des routes |
||
53 | public $traderPosition; |
||
54 | public $traderVariation; |
||
55 | |||
56 | public $fight; # victoires - défaites |
||
57 | public $victories; |
||
58 | public $defeat; |
||
59 | public $fightPosition; |
||
60 | public $fightVariation; |
||
61 | |||
62 | public $armies; # nb de pev total flotte + hangar |
||
63 | public $armiesPosition; |
||
64 | public $armiesVariation; |
||
65 | |||
66 | public $resources; # production de ressources par relève (on peut ajouter les recyclages p-e) |
||
67 | public $resourcesPosition; |
||
68 | public $resourcesVariation; |
||
69 | |||
70 | # additional attributes |
||
71 | public $color; |
||
72 | public $name; |
||
73 | public $avatar; |
||
74 | public $status; |
||
75 | |||
76 | /** |
||
77 | * @param int $id |
||
78 | * @return PlayerRanking |
||
79 | */ |
||
80 | public function setId($id) |
||
86 | |||
87 | public function getId() { return $this->id; } |
||
88 | |||
89 | /** |
||
90 | * @param Player $player |
||
91 | * @return PlayerRanking |
||
92 | */ |
||
93 | public function setPlayer(Player $player) |
||
99 | |||
100 | /** |
||
101 | * @return Player |
||
102 | */ |
||
103 | public function getPlayer() |
||
107 | |||
108 | /** |
||
109 | * @param int $general |
||
110 | * @return PlayerRanking |
||
111 | */ |
||
112 | public function setGeneral($general) |
||
118 | |||
119 | /** |
||
120 | * @return int |
||
121 | */ |
||
122 | public function getGeneral() |
||
126 | |||
127 | public function commonRender($playerId, $type) { |
||
199 | } |
||
200 |