Interface Entity

    • Method Detail

      • getPosition

        Position getPosition()
        Returns:
        the position of this entity
      • getDrawInformation

        Drawable getDrawInformation()
        Returns:
        the information required to draw this entity; must not be null
      • initOnPlayfield

        void initOnPlayfield​(Playfield playfield)
        Method to initialize this entity after being added to the playfield.

        This method should not be called from anywhere other than the playfield implementation.

        This method needs to be called by the playfield directly before adding the entity to the field.

        Parameters:
        playfield - The playfield this entity was added to; must not be null
        Throws:
        IllegalArgumentException - if the given playfield is null
        EntityOnAnotherFieldException - if the entity is already on a field