Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
48 | public function afterMaking(Move ...$moves): Puzzle |
||
49 | { |
||
50 | $new = clone $this; |
||
51 | foreach ($moves as $move) { |
||
52 | assert($move instanceof Crossing); |
||
53 | $new->farmer = $new->farmer->after($move); |
||
54 | } |
||
55 | $new->crossings = $new->crossings->add(...$moves); |
||
56 | return $new; |
||
57 | } |
||
59 |