| Total Complexity | 2 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | enum PirateBehaviourEnum: int |
||
| 6 | { |
||
| 7 | // passive |
||
| 8 | case DO_NOTHING = 0; |
||
| 9 | case FLY = 1; |
||
| 10 | case HIDE = 2; |
||
| 11 | case SEARCH_FRIEND = 3; |
||
| 12 | |||
| 13 | // aggressive |
||
| 14 | case RUB_COLONY = 4; |
||
| 15 | case ATTACK_SHIP = 5; |
||
| 16 | case RAGE = 6; |
||
| 17 | case CALL_FOR_SUPPORT = 7; |
||
| 18 | case ASSAULT_PHALANX = 8; |
||
| 19 | |||
| 20 | // auxiliary |
||
| 21 | case GO_ALERT_RED = 9; |
||
| 22 | case DEACTIVATE_SHIELDS = 10; |
||
| 23 | |||
| 24 | public function getProbability(): int |
||
| 38 | }; |
||
| 39 | } |
||
| 40 | |||
| 41 | /** @return array<int, int> */ |
||
| 42 | public static function getBehaviourProbabilities(): array |
||
| 47 |