public static function attack(Country $from, Country $to) { if ($from->hasNeighbour($to)) { return new self(ActionType::attack(), $from, $to); } throw new InvalidActionException('Only neighbours can attack each other'); }
public static function attack(Country $from, Country $to) { if ($from->hasNeighbour($to)) { return new self(ActionType::attack(), $from, $to); } throw new InvalidActionException('Only neighbours can attack each other'); }