Class EnterStationSupport


  • public class EnterStationSupport
    extends Object
    Helpers for players joining other space stations
    • Field Detail

      • ENTER_STATION_MAX_DISTANCE

        public static final int ENTER_STATION_MAX_DISTANCE
        See Also:
        Constant Field Values
    • Constructor Detail

      • EnterStationSupport

        public EnterStationSupport()
    • Method Detail

      • canEnter

        public static boolean canEnter​(SpaceCraft ship,
                                       SpaceStation station)
        Checks whether a player located at ship can enter station
      • findClosest

        public static SpaceStation findClosest​(SpaceCraft ship,
                                               List<SpaceStation> stations,
                                               boolean infiniteRange,
                                               boolean mannedOnly)
        Finds the closest station a player located at ship can join
        Parameters:
        stations - List of candidates to join
        infiniteRange - Whether the standard range players can join stations applies
        mannedOnly - Only find stations that are already manned by other players
      • calculateRealMaxDistance

        public static double calculateRealMaxDistance​(SpaceCraft ship,
                                                      SpaceStation station)
        Returns the maximum standard distance ship can enter station