Interface WallState

All Superinterfaces:
Loadable
All Known Implementing Classes:
Default, Empty, End, Light

public interface WallState extends Loadable
Represents the state of a wall in a labyrinth.

The WallState interface defines properties and behaviors of walls in a labyrinth, such as whether the wall is light, empty, or generable. It also provides methods to retrieve the absorption value and the color associated with the wall.

As the labyrinth system evolves, additional parameters for wall states may be added. Implementations of this interface should provide the specific behavior for each of the defined methods based on the type of wall they represent.

The default method thisEquals(Object) checks if the current wall state is equal to another object, either by class type or class comparison.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Returns the absorption coefficient of the wall, which can be used to model properties like energy absorption or blocking power of the wall.
    @NotNull Color
    Returns the color of the wall.
    boolean
    Returns whether the wall is empty (i.e., there is no wall).
    boolean
    Returns whether the wall is generable, meaning it can be dynamically created or altered.
    boolean
    Returns whether the wall is light (e.g., transparent or lit).
    default boolean
    Checks if this wall state is equal to another object.
  • Method Details

    • isLight

      boolean isLight()
      Returns whether the wall is light (e.g., transparent or lit).
      Returns:
      true if the wall is light, false otherwise
    • isEmpty

      boolean isEmpty()
      Returns whether the wall is empty (i.e., there is no wall).
      Returns:
      true if the wall is empty, false otherwise
    • isGenerable

      boolean isGenerable()
      Returns whether the wall is generable, meaning it can be dynamically created or altered.
      Returns:
      true if the wall is generable, false otherwise
    • getAbsorption

      double getAbsorption()
      Returns the absorption coefficient of the wall, which can be used to model properties like energy absorption or blocking power of the wall.
      Returns:
      the absorption value of the wall
    • getColor

      @NotNull @NotNull Color getColor()
      Returns the color of the wall.
      Returns:
      the color of the wall
    • thisEquals

      default boolean thisEquals(Object o)
      Checks if this wall state is equal to another object.

      The method compares the class of the current object to the class of the provided object to determine if they are the same type.

      Parameters:
      o - the object to compare to
      Returns:
      true if the objects are of the same class, false otherwise