 |
Gridarta Editor
|
Go to the documentation of this file.
20 package net.sf.gridarta.model.mapmodel;
22 import java.awt.Point;
23 import java.util.Iterator;
24 import java.util.NoSuchElementException;
29 import org.jetbrains.annotations.NotNull;
30 import org.jetbrains.annotations.Nullable;
84 throw new IllegalArgumentException(
"invalid direction: " +
direction);
105 public void remove() {
106 throw new UnsupportedOperationException(
"unsupported operation");
117 throw new NoSuchElementException(
"no more elements");
int getWidth()
Returns the width of the area.
A getMapArchObject()
Returns the Map Arch Object with the meta information about the map.
Base package of all Gridarta classes.
final MapModel< G, A, R > mapModel
The MapModel to iterate over.
MapSquareIterator(@NotNull final MapModel< G, A, R > mapModel, @Nullable final Point start, final int direction, final boolean skipFirst)
Creates a new instance.
int remainingMapSquares
The number of remaining map square to return from next().
Reflects a game object (object on a map).
final int mapWidth
The mapModel's map width.
final int direction
The direction to iterate:
GameObjects are the objects based on Archetypes found on maps.
MapSquare< G, A, R > next()
int getHeight()
Returns the height of the area.
int point
Index of current map square.
Interface for MapArchObjects.
final int mapHeight
The mapModel's map height.
MapSquare< G, A, R > getMapSquare(@NotNull Point pos)
Get the square at a specified location.
void nextMapSquare()
Updates point to the next map square.
The class Size2D represents a 2d rectangular area.
Iterator for iterating over all squares of a model.