Class Default

java.lang.Object
net.regsirius06.engine.core.walls.Default
All Implemented Interfaces:
Loadable, WallState

public final class Default extends Object implements WallState
Represents the default wall state in the labyrinth.

This class implements the WallState interface and defines a standard, non-light, non-empty wall with a moderate absorption coefficient. It serves as the default implementation for walls in the labyrinth system.

The default wall is generable, meaning it can be dynamically created within the labyrinth.

See Also:
  • Constructor Details

    • Default

      public Default()
  • Method Details

    • isLight

      public boolean isLight()
      Determines if the wall allows light to pass through.
      Specified by:
      isLight in interface WallState
      Returns:
      false since the default wall is opaque.
    • isEmpty

      public boolean isEmpty()
      Determines if the wall is empty (i.e., non-existent).
      Specified by:
      isEmpty in interface WallState
      Returns:
      false since this represents a solid wall.
    • isGenerable

      public boolean isGenerable()
      Determines if the wall can be generated dynamically.
      Specified by:
      isGenerable in interface WallState
      Returns:
      true since this wall type can be created in the labyrinth.
    • getAbsorption

      public double getAbsorption()
      Returns the absorption coefficient of the wall.

      This value represents how much energy the wall absorbs when interacting with external forces (e.g., sound, light, or other mechanics).

      Specified by:
      getAbsorption in interface WallState
      Returns:
      the absorption coefficient, which is 0.2 for the default wall.
    • getColor

      @NotNull public @NotNull Color getColor()
      Returns the color of the wall.
      Specified by:
      getColor in interface WallState
      Returns:
      Color.GRAY, representing the default wall color.