All Implemented Interfaces:
Pickable, Scorable

public class Dot extends MapItem implements Pickable, Scorable
Represents a dot in the labyrinth/map.
  • Field Details

    • picked

      private boolean picked
      This attribute allows us to manage if the dot 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 dot gives.
      See Also:
  • Constructor Details

    • Dot

      public Dot(Position position)
      Constructor with argument.
      The value for pathable is true and for sprite is Sprite.DOT.
      Parameters:
      position - The position where the dot 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.