1 | <?php |
||
13 | class Pokemon |
||
14 | { |
||
15 | /** |
||
16 | * @var string |
||
17 | */ |
||
18 | protected $name; |
||
19 | |||
20 | /** |
||
21 | * @var int |
||
22 | */ |
||
23 | protected $cp; |
||
24 | |||
25 | /** |
||
26 | * @var int |
||
27 | */ |
||
28 | protected $hp; |
||
29 | |||
30 | /** |
||
31 | * @var int |
||
32 | */ |
||
33 | protected $baseAttack; |
||
34 | |||
35 | /** |
||
36 | * @var int |
||
37 | */ |
||
38 | protected $baseDefense; |
||
39 | |||
40 | /** |
||
41 | * @var int |
||
42 | */ |
||
43 | protected $baseStamina; |
||
44 | |||
45 | /** |
||
46 | * @var Collection |
||
47 | */ |
||
48 | protected $ivCombinaisons; |
||
49 | |||
50 | /** |
||
51 | * Pokemon constructor. |
||
52 | * @param string $name |
||
53 | * @param int $baseAttack |
||
54 | * @param int $baseDefense |
||
55 | * @param int $baseStamina |
||
56 | */ |
||
57 | public function __construct( |
||
68 | |||
69 | /** |
||
70 | * Return the minimum of perfection of a Pokemon |
||
71 | * @return IvCombinaison|null |
||
72 | */ |
||
73 | public function getMinimumCombinaison(): ?IvCombinaison |
||
82 | |||
83 | /** |
||
84 | * Return the maximum of perfection of a Pokemon |
||
85 | * @return IvCombinaison|null |
||
86 | */ |
||
87 | public function getMaximumCombinaison(): ?IvCombinaison |
||
96 | |||
97 | /** |
||
98 | * Return the average perfection of a Pokemon |
||
99 | * @return float|null |
||
100 | */ |
||
101 | public function getAveragePerfection(): ?float |
||
108 | |||
109 | /** |
||
110 | * Return the min attack of a Pokemon |
||
111 | * @return int |
||
112 | */ |
||
113 | public function getMinAttack(): ?int |
||
120 | |||
121 | /** |
||
122 | * Return the max attack of a Pokemon |
||
123 | * @return int |
||
124 | */ |
||
125 | public function getMaxAttack(): ?int |
||
132 | |||
133 | /** |
||
134 | * Return the min defense of a Pokemon |
||
135 | * @return int |
||
136 | */ |
||
137 | public function getMinDefense(): ?int |
||
144 | |||
145 | /** |
||
146 | * Return the max defense of a Pokemon |
||
147 | * @return int |
||
148 | */ |
||
149 | public function getMaxDefense(): ?int |
||
156 | |||
157 | /** |
||
158 | * Return the min stamina of a Pokemon |
||
159 | * @return int |
||
160 | */ |
||
161 | public function getMinStamina(): ?int |
||
168 | |||
169 | /** |
||
170 | * Return the max stamina of a Pokemon |
||
171 | * @return int |
||
172 | */ |
||
173 | public function getMaxStamina(): ?int |
||
180 | |||
181 | /** |
||
182 | * Get ivCombinaisons |
||
183 | * |
||
184 | * @return Collection |
||
185 | */ |
||
186 | public function getIvCombinaisons(): Collection |
||
190 | |||
191 | /** |
||
192 | * Set ivCombinaisons |
||
193 | * |
||
194 | * @param Collection $ivCombinaisons |
||
195 | * |
||
196 | * @return Pokemon |
||
197 | */ |
||
198 | public function setIvCombinaisons(Collection $ivCombinaisons) |
||
204 | |||
205 | /** |
||
206 | * Get name |
||
207 | * |
||
208 | * @return string |
||
209 | */ |
||
210 | public function getName(): string |
||
214 | |||
215 | /** |
||
216 | * Get cp |
||
217 | * |
||
218 | * @return int|null |
||
219 | */ |
||
220 | public function getCp(): ?int |
||
224 | |||
225 | /** |
||
226 | * Set cp |
||
227 | * |
||
228 | * @param int $cp |
||
229 | * |
||
230 | * @return Pokemon |
||
231 | */ |
||
232 | public function setCp(int $cp) |
||
237 | |||
238 | /** |
||
239 | * Get hp |
||
240 | * |
||
241 | * @return int|null |
||
242 | */ |
||
243 | public function getHp(): ?int |
||
247 | |||
248 | /** |
||
249 | * Set hp |
||
250 | * |
||
251 | * @param int $hp |
||
252 | * |
||
253 | * @return Pokemon |
||
254 | */ |
||
255 | public function setHp(int $hp) |
||
260 | |||
261 | /** |
||
262 | * Get baseAttack |
||
263 | * |
||
264 | * @return int |
||
265 | */ |
||
266 | public function getBaseAttack(): int |
||
270 | |||
271 | /** |
||
272 | * Get baseDefense |
||
273 | * |
||
274 | * @return int |
||
275 | */ |
||
276 | public function getBaseDefense(): int |
||
280 | |||
281 | /** |
||
282 | * Get baseStamina |
||
283 | * |
||
284 | * @return int |
||
285 | */ |
||
286 | public function getBaseStamina(): int |
||
290 | } |
||
291 |