| 7 | static auto& routings() { return getGameState().routings; } |
| 8 | |
| 9 | static std::optional<uint16_t> findFreeRoutingVehicleRef() |
| 10 | { |
| 11 | const auto& routingArr = routings(); |
| 12 | const auto res = std::find_if(std::begin(routingArr), std::end(routingArr), [](const auto& route) { return route[0] == kRoutingNull; }); |
| 13 | if (res == std::end(routingArr)) |
| 14 | { |
| 15 | return std::nullopt; |
| 16 | } |
| 17 | return std::distance(std::begin(routingArr), res); |
| 18 | } |
| 19 | |
| 20 | void resetRoutings(const RoutingHandle handle) |
| 21 | { |
no test coverage detected