Class Empty

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

public final class Empty extends Object implements WallState
Represents an empty space in the labyrinth.

The Empty class is an implementation of WallState that defines a non-obstructive, passable area. It is the opposite of a solid wall, meaning that it does not block movement or absorb energy.

This class is useful for defining pathways, open spaces, or areas where players and entities can move freely.

See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Returns the absorption coefficient of this state.
    @NotNull Color
    Returns the color representation of this state.
    boolean
    Indicates whether this state represents an empty space.
    boolean
    Indicates whether this state can be dynamically generated.
    boolean
    Indicates whether this state represents a light source.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.regsirius06.engine.API.WallState

    thisEquals
  • Constructor Details

    • Empty

      public Empty()
  • Method Details

    • isLight

      public boolean isLight()
      Indicates whether this state represents a light source.
      Specified by:
      isLight in interface WallState
      Returns:
      false as an empty space does not emit light by default
    • isEmpty

      public boolean isEmpty()
      Indicates whether this state represents an empty space.
      Specified by:
      isEmpty in interface WallState
      Returns:
      true since this class defines an empty, passable area
    • isGenerable

      public boolean isGenerable()
      Indicates whether this state can be dynamically generated.
      Specified by:
      isGenerable in interface WallState
      Returns:
      true since empty spaces can be generated in labyrinths
    • getAbsorption

      public double getAbsorption()
      Returns the absorption coefficient of this state.

      Since this is an empty space, it does not absorb any energy.

      Specified by:
      getAbsorption in interface WallState
      Returns:
      0, meaning no absorption
    • getColor

      @NotNull public @NotNull Color getColor()
      Returns the color representation of this state.

      The empty space is represented as black.

      Specified by:
      getColor in interface WallState
      Returns:
      Color.BLACK, representing an empty void