Total Complexity | 6 |
Total Lines | 38 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php |
||
13 | final class LeaveStarSystem extends AbstractDirectedMovement |
||
14 | { |
||
15 | public const ACTION_IDENTIFIER = 'B_LEAVE_STARSYSTEM'; |
||
16 | |||
17 | protected function isSanityCheckFaultyConcrete(ShipWrapperInterface $wrapper, GameControllerInterface $game): bool |
||
18 | { |
||
19 | $ship = $wrapper->get(); |
||
20 | |||
21 | $starsystemMap = $ship->getStarsystemMap(); |
||
22 | if ($starsystemMap === null) { |
||
23 | return true; |
||
24 | } |
||
25 | |||
26 | //the destination map field |
||
27 | $outerMap = $starsystemMap->getSystem()->getMapField(); |
||
28 | if ($outerMap === null) { |
||
29 | return true; |
||
30 | } |
||
31 | |||
32 | return false; |
||
33 | } |
||
34 | |||
35 | protected function getFlightRoute(ShipWrapperInterface $wrapper): FlightRouteInterface |
||
51 | } |
||
52 | } |
||
53 |