Class Energizer

All Implemented Interfaces:
Pickable, Scorable

public class Energizer extends MapItem implements Pickable, Scorable
Represents an energizer in the labyrinth/map.
  • Field Details

    • picked

      private boolean picked
      This attribute allows us to manage if the energizer has been picked or not. Its initial/default value is false.
    • POINTS

      private static final int POINTS
      This attribute stores the amount of points that the energizer gives.
      See Also:
  • Constructor Details

    • Energizer

      public Energizer(Position position)
      Constructor with argument.
      The value for pathable is true and for sprite is Sprite.ENERGIZER.
      Parameters:
      position - The position where the energizer is.
  • Method Details

    • isPicked

      public boolean isPicked()
      Getter of the attribute picked.
      Specified by:
      isPicked in interface Pickable
      Returns:
      The current value of the attribute picked.
      Since:
      isPicked in interface Pickable.
    • setPicked

      public void setPicked(boolean picked)
      Setter of the attribute pickled.
      Specified by:
      setPicked in interface Pickable
      Parameters:
      picked - New value for the attribute picked.
      Since:
      setPicked in interface Pickable.
    • getPoints

      public int getPoints()
      Getter of the attribute POINTS.
      Specified by:
      getPoints in interface Scorable
      Returns:
      Returns the value of the attribute POINTS.
      Since:
      getPoints in interface Scorable.