 |
Gridarta Editor
|
Go to the documentation of this file.
20 package net.sf.gridarta.gui.map.mapactions;
22 import java.awt.Point;
23 import java.util.Iterator;
24 import java.util.NoSuchElementException;
31 import org.jetbrains.annotations.NotNull;
32 import org.jetbrains.annotations.Nullable;
97 throw new IllegalArgumentException(
"unsupported direction: " +
direction);
102 point =
new Point(xStart, yStart);
118 throw new NoSuchElementException(
"no more elements");
125 public void remove() {
126 throw new UnsupportedOperationException(
"unsupported operation");
int getWidth()
Returns the width of the area.
final ExitMatcher< G, A, R > exitMatcher
The ExitMatcher for selecting exit game objects.
A MapModel reflects the data of a map.
void nextPoint(Point point, int direction)
Moves the given point forward or backward one map square.
A getMapArchObject()
Returns the Map Arch Object with the meta information about the map.
Base package of all Gridarta classes.
An Iterator that returns all map squares containing an exit game object.
ExitIterator(@NotNull final ExitMatcher< G, A, R > exitMatcher, @NotNull final MapModel< G, A, R > mapModel, final int xStart, final int yStart, final int direction)
Creates a new instance.
Reflects a game object (object on a map).
Selects valid exit game objects from maps.
GameObjects are the objects based on Archetypes found on maps.
int getHeight()
Returns the height of the area.
Interface for MapArchObjects.
boolean findNextPending
Whether next is valid.
int remainingMapSquares
The number of map squares remaining to be searched.
G getValidExit(@NotNull final MapModel< G, A, R > mapModel, @NotNull final Point point)
Returns an exit game object on a given map square having exit information.
final G start
The starting exit game object or.
void findNext()
Updates next to the next match.
final int direction
The search direction:
final MapModel< G, A, R > mapModel
The MapModel begin searched.
final Point point
The current location on the map.
The class Size2D represents a 2d rectangular area.
G next
The next exit game object to return from next().