Package org.rspeer.game.position.area
Interface Area
- All Known Implementing Classes:
DiscreetRectangularArea
,PolygonalArea
,RectangularArea
,SingularArea
public interface Area
Represents a game
Area
of positions
-
Method Summary
Modifier and TypeMethodDescriptiondefault Area
adjust
(int x, int y) boolean
static Area
discreet
(int x1, int y1, int x2, int y2, int floorLevel) static Area
Factory method to create a discreet rectangular Areadefault Collection<Position>
getBoundaryPositions
(boolean outer) default Collection<Position>
default Position
int
default Position
getTiles()
default boolean
default boolean
isInFieldOfViewOf
(Area o, CollisionFlagOverride override) static Area
Factory method to create a polygonal areastatic Area
rectangular
(int x1, int y1, int x2, int y2, int floorLevel) static Area
rectangular
(Position a, Position b) Factory method to create a rectangular Areastatic Area
Factory method to create a singular Areastatic Area
surrounding
(Position origin, int distance) default Area
translate
(int x, int y) default Area
-
Method Details
-
surrounding
-
rectangular
Factory method to create a rectangular Area- Parameters:
a
- A corner of the areab
- Opposite corner of the area- Returns:
- A rectangular area
-
rectangular
-
discreet
Factory method to create a discreet rectangular Area- Parameters:
a
- A corner of the areab
- Opposite corner of the area- Returns:
- A rectangular area
-
discreet
-
singular
Factory method to create a singular Area- Parameters:
p
- The only position in the area- Returns:
- A area with a singular position
-
polygonal
Factory method to create a polygonal area- Parameters:
edges
- The edges of the area polygon- Returns:
- A polygonal area
-
getRandomTile
-
getFloorLevel
int getFloorLevel() -
getTiles
Collection<Position> getTiles() -
ignoreFloorLevel
Area ignoreFloorLevel() -
contains
-
translate
-
translate
-
getBoundaryPositions
-
getBoundaryVertices
-
adjust
-
isInFieldOfViewOf
-
isInFieldOfViewOf
-
getCenter
-