Package net.regsirius06.engine.utils
Interface ILabyrinth2D
- All Known Implementing Classes:
Labyrinth2D
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 TypeMethodDescriptionbooleancheckAddress(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.get(P p) Deprecated.Returns the wall type at the location of a givenPoint.intDeprecated.Returns the dimension of the labyrinth (i.e., the width/height of the square grid).@NotNull PointDeprecated.Returns the spawn point of the labyrinth.booleanisCollidingWithWall(double x, double y) Deprecated.Checks if the specified position (x, y) is colliding with a wall in the labyrinth.voidDeprecated.Sets the wall type at the specified coordinates (x, y) in the labyrinth.default voidDeprecated.Sets the wall type in its location.default <P extends Point>
voidDeprecated.Sets the wall type at the location of a givenPoint.
-
Method Details
-
get
Deprecated.Returns the wall type at the specified coordinates (x, y) in the labyrinth.- Parameters:
x- the x-coordinatey- the y-coordinate- Returns:
- the
Wallat the given coordinates
-
get
Deprecated.Returns the wall type at the location of a givenPoint. -
set
Deprecated.Sets the wall type at the specified coordinates (x, y) in the labyrinth.- Parameters:
x- the x-coordinatey- the y-coordinatewall- the wall type to set
-
set
Deprecated.Sets the wall type at the location of a givenPoint.- Type Parameters:
P- the type of point (subtype ofPoint)- Parameters:
p- the point to set the wall type forwall- the wall type to set
-
set
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-coordinatey- 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-coordinatey- the y-coordinate- Returns:
- true if there is a collision with a wall, false otherwise
-
getSpawnPoint
Deprecated.Returns the spawn point of the labyrinth.- Returns:
- the
Pointrepresenting 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
-