Interface Element<E extends java.lang.Number>

All Known Implementing Classes:
BlackListCell, Cell, CrossableCell, Entity, HUDElement, OutOfBoundCell, RestrictiveCell, UncrossableCell, VoidCell, Wall, WhiteListCell

public interface Element<E extends java.lang.Number>
A graphical element. Could be a Cell, an Entity or anything graphical. Possess coordinates, a Sprite and a Name.
  • Method Details

    • getDimension

      Dimension getDimension()
      Return dimension of the Element. Represents the size of the Element.
      Returns:
      Dimension of the element
    • setDimension

      void setDimension​(Dimension dimension)
      Allows to set dimension of the element, representing its size.
      Parameters:
      dimension - Dimension to set
    • getSprite

      Sprite getSprite()
      Returns sprite of the element
      Returns:
      Sprite of the element
    • setSprite

      void setSprite​(Sprite sprite)
      Set sprite of an element
      Parameters:
      sprite - sprite to set
    • getCoordinates

      Coordinates<E> getCoordinates()
      Coordinates of the element in the game.
      Returns:
      Coordinates of the element
    • setCoordinates

      void setCoordinates​(Coordinates<E> coordinates)
      Allows setting new coordinates for the element.
      Parameters:
      coordinates - new coordinates
    • getName

      java.lang.String getName()
      Name getter of the element
      Returns:
      String name of the element