Interface ILabyrinth2D

All Known Implementing Classes:
Labyrinth2D

@Deprecated public interface ILabyrinth2D
Deprecated.
Interface for various implementations of 2D labyrinths. This interface defines methods for retrieving and setting wall types at specific coordinates in the labyrinth. It also includes methods for checking collisions and retrieving key features such as the spawn point and labyrinth dimensions.

Implementations of this interface are expected to handle the specifics of storing and manipulating the labyrinth structure, including managing the wall types and verifying if a point is within the labyrinth's bounds.

  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    checkAddress(int x, int y)
    Deprecated.
    Checks if the specified coordinates are within the bounds of the labyrinth.
    get(int x, int y)
    Deprecated.
    Returns the wall type at the specified coordinates (x, y) in the labyrinth.
    default <P extends Point>
    Wall
    get(P p)
    Deprecated.
    Returns the wall type at the location of a given Point.
    int
    Deprecated.
    Returns the dimension of the labyrinth (i.e., the width/height of the square grid).
    @NotNull Point
    Deprecated.
    Returns the spawn point of the labyrinth.
    boolean
    isCollidingWithWall(double x, double y)
    Deprecated.
    Checks if the specified position (x, y) is colliding with a wall in the labyrinth.
    void
    set(int x, int y, Wall wall)
    Deprecated.
    Sets the wall type at the specified coordinates (x, y) in the labyrinth.
    default void
    set(Wall wall)
    Deprecated.
    Sets the wall type in its location.
    default <P extends Point>
    void
    set(P p, Wall wall)
    Deprecated.
    Sets the wall type at the location of a given Point.
  • Method Details

    • get

      Wall get(int x, int y)
      Deprecated.
      Returns the wall type at the specified coordinates (x, y) in the labyrinth.
      Parameters:
      x - the x-coordinate
      y - the y-coordinate
      Returns:
      the Wall at the given coordinates
    • get

      default <P extends Point> Wall get(@NotNull P p)
      Deprecated.
      Returns the wall type at the location of a given Point.
      Type Parameters:
      P - the type of point (subtype of Point)
      Parameters:
      p - the point to get the wall type for
      Returns:
      the Wall at the given point
    • set

      void set(int x, int y, Wall wall)
      Deprecated.
      Sets the wall type at the specified coordinates (x, y) in the labyrinth.
      Parameters:
      x - the x-coordinate
      y - the y-coordinate
      wall - the wall type to set
    • set

      default <P extends Point> void set(@NotNull P p, Wall wall)
      Deprecated.
      Sets the wall type at the location of a given Point.
      Type Parameters:
      P - the type of point (subtype of Point)
      Parameters:
      p - the point to set the wall type for
      wall - the wall type to set
    • set

      default void set(Wall wall)
      Deprecated.
      Sets the wall type in its location.
      Parameters:
      wall - the wall type to set
    • checkAddress

      boolean checkAddress(int x, int y)
      Deprecated.
      Checks if the specified coordinates are within the bounds of the labyrinth.
      Parameters:
      x - the x-coordinate
      y - the y-coordinate
      Returns:
      true if the coordinates are within bounds, false otherwise
    • isCollidingWithWall

      boolean isCollidingWithWall(double x, double y)
      Deprecated.
      Checks if the specified position (x, y) is colliding with a wall in the labyrinth.
      Parameters:
      x - the x-coordinate
      y - the y-coordinate
      Returns:
      true if there is a collision with a wall, false otherwise
    • getSpawnPoint

      @NotNull @NotNull Point getSpawnPoint()
      Deprecated.
      Returns the spawn point of the labyrinth.
      Returns:
      the Point representing the spawn point
    • getDimension

      int getDimension()
      Deprecated.
      Returns the dimension of the labyrinth (i.e., the width/height of the square grid).
      Returns:
      the dimension of the labyrinth