Interface Area

All Known Implementing Classes:
DiscreetRectangularArea, PolygonalArea, RectangularArea, SingularArea

public interface Area
Represents a game Area of positions
  • Method Details

    • surrounding

      static Area surrounding(Position origin, int distance)
    • rectangular

      static Area rectangular(Position a, Position b)
      Factory method to create a rectangular Area
      Parameters:
      a - A corner of the area
      b - Opposite corner of the area
      Returns:
      A rectangular area
    • rectangular

      static Area rectangular(int x1, int y1, int x2, int y2, int floorLevel)
    • discreet

      static Area discreet(Position a, Position b)
      Factory method to create a discreet rectangular Area
      Parameters:
      a - A corner of the area
      b - Opposite corner of the area
      Returns:
      A rectangular area
    • discreet

      static Area discreet(int x1, int y1, int x2, int y2, int floorLevel)
    • singular

      static Area singular(Position p)
      Factory method to create a singular Area
      Parameters:
      p - The only position in the area
      Returns:
      A area with a singular position
    • polygonal

      static Area polygonal(Position... edges)
      Factory method to create a polygonal area
      Parameters:
      edges - The edges of the area polygon
      Returns:
      A polygonal area
    • getRandomTile

      default Position getRandomTile()
    • getFloorLevel

      int getFloorLevel()
    • getTiles

      Collection<Position> getTiles()
    • ignoreFloorLevel

      Area ignoreFloorLevel()
    • contains

      boolean contains(SceneNode entity)
    • translate

      default Area translate(int x, int y)
    • translate

      default Area translate(Direction direction)
    • getBoundaryPositions

      default Collection<Position> getBoundaryPositions(boolean outer)
    • getBoundaryVertices

      default Collection<Position> getBoundaryVertices()
    • adjust

      default Area adjust(int x, int y)
    • isInFieldOfViewOf

      default boolean isInFieldOfViewOf(Area o)
    • isInFieldOfViewOf

      default boolean isInFieldOfViewOf(Area o, CollisionFlagOverride override)
    • getCenter

      default Position getCenter()