Total Complexity | 7 |
Total Lines | 95 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
9 | class World |
||
10 | { |
||
11 | /** |
||
12 | * Size of the square matrix. |
||
13 | * |
||
14 | * @var int |
||
15 | */ |
||
16 | private $cells; |
||
17 | |||
18 | /** |
||
19 | * Number of max iterations. |
||
20 | * |
||
21 | * @var int |
||
22 | */ |
||
23 | private $iterations; |
||
24 | |||
25 | /** |
||
26 | * Number of max species. |
||
27 | * |
||
28 | * @var int |
||
29 | */ |
||
30 | private $species; |
||
31 | |||
32 | /** |
||
33 | * World constructor. |
||
34 | * |
||
35 | * @param int $cells |
||
36 | * @param int $species |
||
37 | * @param int $iterations |
||
38 | */ |
||
39 | public function __construct(int $cells, int $species, int $iterations) |
||
44 | } |
||
45 | |||
46 | /** |
||
47 | * Returns the size of the square matrix. |
||
48 | * |
||
49 | * @return int |
||
50 | */ |
||
51 | public function getCells(): int |
||
54 | } |
||
55 | |||
56 | /** |
||
57 | * Set's the size of the square matrix. |
||
58 | * |
||
59 | * @param int $cells |
||
60 | */ |
||
61 | public function setCells(int $cells) |
||
62 | { |
||
63 | $this->cells = $cells; |
||
64 | } |
||
65 | |||
66 | /** |
||
67 | * Returns the number of max iterations. |
||
68 | * |
||
69 | * @return int |
||
70 | */ |
||
71 | public function getIterations(): int |
||
74 | } |
||
75 | |||
76 | /** |
||
77 | * Sets the number of max iterations. |
||
78 | * |
||
79 | * @param int $iterations |
||
80 | */ |
||
81 | public function setIterations(int $iterations) |
||
82 | { |
||
83 | $this->iterations = $iterations; |
||
84 | } |
||
85 | |||
86 | /** |
||
87 | * Returns the number of max species. |
||
88 | * |
||
89 | * @return int |
||
90 | */ |
||
91 | public function getSpecies(): int |
||
92 | { |
||
93 | return $this->species; |
||
94 | } |
||
95 | |||
96 | /** |
||
97 | * Sets the number of max species. |
||
98 | * |
||
99 | * @param int $species |
||
100 | */ |
||
101 | public function setSpecies(int $species) |
||
104 | } |
||
105 | } |