Interface Entity
-
- All Known Subinterfaces:
CollectableEntity,SolidEntity
- All Known Implementing Classes:
BasicEntity,GreedyEntity,MovableEntity
public interface EntityThe interface for an entity in the simulation of the ICGE.- Author:
- Tim Neumann
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DrawablegetDrawInformation()PositiongetPosition()voidinitOnPlayfield(Playfield playfield)Method to initialize this entity after being added to the playfield.
-
-
-
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 needs to be called by the playfield directly after the entity was added.
- Parameters:
playfield- The playfield this entity was added to; must not be null- Throws:
IllegalArgumentException- if the given playfield is null
-
-