|
||||||||
PREV NEXT | FRAMES NO FRAMES |
Uses of Location in WatorWorld |
---|
Methods in WatorWorld that return Location | |
---|---|
Location |
Location.getAdjacentLocation(int direction)
Gets the adjacent location in any one of the eight compass directions. |
Location |
Actor.getLocation()
Gets the location of this actor. |
Methods in WatorWorld that return types with arguments of type Location | |
---|---|
ArrayList<Location> |
Grid.getEmptyAdjacentLocations(Location loc)
Gets the valid empty locations adjacent to a given location in all eight compass directions (north, northeast, east, southeast, south, southwest, west, and northwest). |
ArrayList<Location> |
AbstractGrid.getEmptyAdjacentLocations(Location loc)
|
ArrayList<Location> |
Grid.getOccupiedAdjacentLocations(Location loc)
Gets the valid occupied locations adjacent to a given location in all eight compass directions (north, northeast, east, southeast, south, southwest, west, and northwest). |
ArrayList<Location> |
AbstractGrid.getOccupiedAdjacentLocations(Location loc)
|
ArrayList<Location> |
Grid.getOccupiedLocations()
Gets the locations in this grid that contain objects. |
ArrayList<Location> |
BoundedGrid.getOccupiedLocations()
|
ArrayList<Location> |
WrappedBoundedGrid.getValidAdjacentLocations(Location loc)
|
ArrayList<Location> |
Grid.getValidAdjacentLocations(Location loc)
Gets the valid locations adjacent to a given location in all eight compass directions (north, northeast, east, southeast, south, southwest, west, and northwest). |
ArrayList<Location> |
AbstractGrid.getValidAdjacentLocations(Location loc)
|
Methods in WatorWorld with parameters of type Location | |
---|---|
int |
Location.compareTo(Location other)
Compares this location to other for ordering. |
E |
Grid.get(Location loc)
Returns the object at a given location in this grid. |
E |
BoundedGrid.get(Location loc)
|
int |
Location.getDirectionToward(Location target)
Returns the direction from this location toward another location. |
ArrayList<Location> |
Grid.getEmptyAdjacentLocations(Location loc)
Gets the valid empty locations adjacent to a given location in all eight compass directions (north, northeast, east, southeast, south, southwest, west, and northwest). |
ArrayList<Location> |
AbstractGrid.getEmptyAdjacentLocations(Location loc)
|
ArrayList<E> |
Grid.getNeighbors(Location loc)
Gets the neighboring occupants in all eight compass directions (north, northeast, east, southeast, south, southwest, west, and northwest). |
ArrayList<E> |
AbstractGrid.getNeighbors(Location loc)
|
ArrayList<Location> |
Grid.getOccupiedAdjacentLocations(Location loc)
Gets the valid occupied locations adjacent to a given location in all eight compass directions (north, northeast, east, southeast, south, southwest, west, and northwest). |
ArrayList<Location> |
AbstractGrid.getOccupiedAdjacentLocations(Location loc)
|
ArrayList<Location> |
WrappedBoundedGrid.getValidAdjacentLocations(Location loc)
|
ArrayList<Location> |
Grid.getValidAdjacentLocations(Location loc)
Gets the valid locations adjacent to a given location in all eight compass directions (north, northeast, east, southeast, south, southwest, west, and northwest). |
ArrayList<Location> |
AbstractGrid.getValidAdjacentLocations(Location loc)
|
boolean |
Grid.isValid(Location loc)
Checks whether a location is valid in this grid. |
boolean |
BoundedGrid.isValid(Location loc)
|
void |
Actor.moveTo(Location newLocation)
Moves this actor to a new location. |
E |
Grid.put(Location loc,
E obj)
Puts an object at a given location in this grid. |
E |
BoundedGrid.put(Location loc,
E obj)
|
void |
Actor.putSelfInGrid(Grid<Actor> gr,
Location loc)
Puts this actor into a grid. |
E |
Grid.remove(Location loc)
Removes the object at a given location from this grid. |
E |
BoundedGrid.remove(Location loc)
|
|
||||||||
PREV NEXT | FRAMES NO FRAMES |