|
||||||||||
| PREV NEXT | FRAMES NO FRAMES | |||||||||
| Packages that use Location | |
|---|---|
| gridWorldTest | |
| info.gridworld.actor | |
| info.gridworld.grid | |
| info.gridworld.gui | |
| info.gridworld.world | |
| Uses of Location in gridWorldTest |
|---|
| Methods in gridWorldTest that return types with arguments of type Location | |
|---|---|
java.util.ArrayList<Location> |
CrabCritter.getLocationsInDirections(int[] directions)
Finds the valid adjacent locations of this critter in different directions. |
java.util.ArrayList<Location> |
CrabCritter.getMoveLocations()
|
| Methods in gridWorldTest with parameters of type Location | |
|---|---|
void |
ChameleonCritter.makeMove(Location loc)
Turns towards the new location as it moves. |
void |
CrabCritter.makeMove(Location loc)
If the crab critter doesn't move, it randomly turns left or right. |
| Uses of Location in info.gridworld.actor |
|---|
| Methods in info.gridworld.actor that return Location | |
|---|---|
Location |
Actor.getLocation()
Gets the location of this actor. |
Location |
Critter.selectMoveLocation(java.util.ArrayList<Location> locs)
Selects the location for the next move. |
| Methods in info.gridworld.actor that return types with arguments of type Location | |
|---|---|
java.util.ArrayList<Location> |
Critter.getMoveLocations()
Gets a list of possible locations for the next move. |
| Methods in info.gridworld.actor with parameters of type Location | |
|---|---|
void |
ActorWorld.add(Location loc,
Actor occupant)
Adds an actor to this world at a given location. |
void |
Critter.makeMove(Location loc)
Moves this critter to the given location loc, or removes
this critter from its grid if loc is null. |
void |
Actor.moveTo(Location newLocation)
Moves this actor to a new location. |
void |
Actor.putSelfInGrid(Grid<Actor> gr,
Location loc)
Puts this actor into a grid. |
Actor |
ActorWorld.remove(Location loc)
Removes an actor from this world. |
| Method parameters in info.gridworld.actor with type arguments of type Location | |
|---|---|
Location |
Critter.selectMoveLocation(java.util.ArrayList<Location> locs)
Selects the location for the next move. |
| Uses of Location in info.gridworld.grid |
|---|
| Methods in info.gridworld.grid that return Location | |
|---|---|
Location |
Location.getAdjacentLocation(int direction)
Gets the adjacent location in any one of the eight compass directions. |
| Methods in info.gridworld.grid that return types with arguments of type Location | |
|---|---|
java.util.ArrayList<Location> |
AbstractGrid.getEmptyAdjacentLocations(Location loc)
|
java.util.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). |
java.util.ArrayList<Location> |
AbstractGrid.getOccupiedAdjacentLocations(Location loc)
|
java.util.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). |
java.util.ArrayList<Location> |
BoundedGrid.getOccupiedLocations()
|
java.util.ArrayList<Location> |
Grid.getOccupiedLocations()
Gets the locations in this grid that contain objects. |
java.util.ArrayList<Location> |
UnboundedGrid.getOccupiedLocations()
|
java.util.ArrayList<Location> |
AbstractGrid.getValidAdjacentLocations(Location loc)
|
java.util.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). |
| Methods in info.gridworld.grid with parameters of type Location | |
|---|---|
E |
BoundedGrid.get(Location loc)
|
E |
Grid.get(Location loc)
Returns the object at a given location in this grid. |
E |
UnboundedGrid.get(Location loc)
|
int |
Location.getDirectionToward(Location target)
Returns the direction from this location toward another location. |
java.util.ArrayList<Location> |
AbstractGrid.getEmptyAdjacentLocations(Location loc)
|
java.util.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). |
java.util.ArrayList<E> |
AbstractGrid.getNeighbors(Location loc)
|
java.util.ArrayList<E> |
Grid.getNeighbors(Location loc)
Gets the neighboring occupants in all eight compass directions (north, northeast, east, southeast, south, southwest, west, and northwest). |
java.util.ArrayList<Location> |
AbstractGrid.getOccupiedAdjacentLocations(Location loc)
|
java.util.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). |
java.util.ArrayList<Location> |
AbstractGrid.getValidAdjacentLocations(Location loc)
|
java.util.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). |
boolean |
BoundedGrid.isValid(Location loc)
|
boolean |
Grid.isValid(Location loc)
Checks whether a location is valid in this grid. |
boolean |
UnboundedGrid.isValid(Location loc)
|
E |
BoundedGrid.put(Location loc,
E obj)
|
E |
Grid.put(Location loc,
E obj)
Puts an object at a given location in this grid. |
E |
UnboundedGrid.put(Location loc,
E obj)
|
E |
BoundedGrid.remove(Location loc)
|
E |
Grid.remove(Location loc)
Removes the object at a given location from this grid. |
E |
UnboundedGrid.remove(Location loc)
|
| Uses of Location in info.gridworld.gui |
|---|
| Methods in info.gridworld.gui that return Location | |
|---|---|
Location |
GridPanel.getCurrentLocation()
Gets the current location. |
Location |
GridPanel.locationForPoint(java.awt.Point p)
Given a Point determine which grid location (if any) is under the mouse. |
| Methods in info.gridworld.gui with parameters of type Location | |
|---|---|
javax.swing.JPopupMenu |
MenuMaker.makeConstructorMenu(java.util.Collection<java.lang.Class> classes,
Location loc)
Makes a menu that displays all public constructors of a collection of classes. |
javax.swing.JPopupMenu |
MenuMaker.makeMethodMenu(T occupant,
Location loc)
Makes a menu that displays all public methods of an object |
java.awt.Point |
GridPanel.pointForLocation(Location loc)
|
void |
GridPanel.recenter(Location loc)
Pans the display back to the origin, so that 0, 0 is at the the upper left of the visible viewport. |
void |
GridPanel.setCurrentLocation(Location loc)
Sets the current location. |
| Uses of Location in info.gridworld.world |
|---|
| Methods in info.gridworld.world that return Location | |
|---|---|
Location |
World.getRandomEmptyLocation()
Gets a random empty location in this world. |
| Methods in info.gridworld.world with parameters of type Location | |
|---|---|
void |
World.add(Location loc,
T occupant)
Adds an occupant at a given location. |
boolean |
World.keyPressed(java.lang.String description,
Location loc)
This method is called when a key was pressed. |
boolean |
World.locationClicked(Location loc)
This method is called when the user clicks on a location in the WorldFrame. |
T |
World.remove(Location loc)
Removes an occupant from a given location. |
|
||||||||||
| PREV NEXT | FRAMES NO FRAMES | |||||||||