diff --git a/src/Domain/Rule/DogAcrossToDogRule.php b/src/Domain/Rule/DogAcrossToDogRule.php index cabf2a7..71b229e 100644 --- a/src/Domain/Rule/DogAcrossToDogRule.php +++ b/src/Domain/Rule/DogAcrossToDogRule.php @@ -23,6 +23,9 @@ public function __toString(): string protected function areDogsCorrectlyPlaced(Dog $firstDog, Dog $secondDog): bool { + if (!$firstDog->isPlaced() || !$secondDog->isPlaced()) { + return true; + } return $firstDog->getBoardPlace()->isInFrontOf($secondDog->getBoardPlace()); }