Package de.extio.spacecraft.shared.bo
Class EnterStationSupport
- java.lang.Object
-
- de.extio.spacecraft.shared.bo.EnterStationSupport
-
public class EnterStationSupport extends Object
Helpers for players joining other space stations
-
-
Field Summary
Fields Modifier and Type Field Description static int
ENTER_STATION_MAX_DISTANCE
-
Constructor Summary
Constructors Constructor Description EnterStationSupport()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static double
calculateRealMaxDistance(SpaceCraft ship, SpaceStation station)
Returns the maximum standard distance ship can enter stationstatic boolean
canEnter(SpaceCraft ship, SpaceStation station)
Checks whether a player located at ship can enter stationstatic SpaceStation
findClosest(SpaceCraft ship, List<SpaceStation> stations, boolean infiniteRange, boolean mannedOnly)
Finds the closest station a player located at ship can join
-
-
-
Field Detail
-
ENTER_STATION_MAX_DISTANCE
public static final int ENTER_STATION_MAX_DISTANCE
- See Also:
- Constant Field Values
-
-
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 joininfiniteRange
- Whether the standard range players can join stations appliesmannedOnly
- 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
-
-