Package rea.components
Class Positionable
java.lang.Object
rea.components.Component
rea.components.Positionable
- All Implemented Interfaces:
Element
A positionable object in the game.
The object has a
Position
in a Place
.
When created, the object lacks a specific position in a place.- Author:
- José Paulo Leal
jpleal@fc.up.pt
-
Field Summary
Fields inherited from class rea.components.Component
description, visual
-
Constructor Summary
ConstructorsConstructorDescriptionPositionable
(Visual visual, String description) Create a positionable object. -
Method Summary
Modifier and TypeMethodDescriptionThe position of the object in the place.void
Move point to a new location.Methods inherited from class rea.components.Component
getDescription, getVisual, toString
-
Constructor Details
-
Positionable
Create a positionable object.- Parameters:
visual
- visual representation of the objectdescription
- description of the object
-
-
Method Details
-
moveTo
Move point to a new location.- Parameters:
position
- new position
-
getPosition
The position of the object in the place.- Returns:
- the position of the object
-