| Total Complexity | 5 |
| Total Lines | 43 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class CCA |
||
| 6 | { |
||
| 7 | /** @var Config */ |
||
| 8 | protected $config; |
||
| 9 | |||
| 10 | /** @var Grid */ |
||
| 11 | protected $grid; |
||
| 12 | |||
| 13 | /** @var int */ |
||
| 14 | protected $generation = 0; |
||
| 15 | |||
| 16 | 6 | public function __construct(Config $config, Grid $grid) |
|
| 17 | { |
||
| 18 | 6 | $this->config = $config; |
|
| 19 | |||
| 20 | 6 | $this->grid = $grid; |
|
| 21 | 6 | } |
|
| 22 | |||
| 23 | 9 | public function cycle(int $cycles = 1): int |
|
| 36 | } |
||
| 37 | |||
| 38 | 3 | public function getState(): State |
|
| 39 | { |
||
| 40 | 3 | return new State($this->grid); |
|
| 41 | } |
||
| 42 | |||
| 43 | 3 | public function printCells() |
|
| 48 | 3 | } |
|
| 49 | } |
||
| 50 |