public interface Map
Modifier and Type | Method and Description |
---|---|
java.lang.Double |
getDistance(java.lang.String fromLocation,
java.lang.String toLocation)
Returns the travel distance between the two specified locations if they
are linked by a connection and null otherwise.
|
java.util.List<java.lang.String> |
getLocations()
Returns a list of all locations.
|
Point2D |
getPosition(java.lang.String loc)
Returns the position of the specified location.
|
java.util.List<java.lang.String> |
getPossibleNextLocations(java.lang.String location)
Answers to the question: Where can I get, following one of the
connections starting at the specified location?
|
java.util.List<java.lang.String> |
getPossiblePrevLocations(java.lang.String location)
Answers to the question: From where can I reach a specified location,
following one of the map connections?
|
java.lang.String |
randomlyGenerateDestination()
Returns a location which is selected by random.
|
java.util.List<java.lang.String> getLocations()
java.util.List<java.lang.String> getPossibleNextLocations(java.lang.String location)
java.util.List<java.lang.String> getPossiblePrevLocations(java.lang.String location)
java.lang.Double getDistance(java.lang.String fromLocation, java.lang.String toLocation)
Point2D getPosition(java.lang.String loc)
java.lang.String randomlyGenerateDestination()