Package rea.components
Class Component
java.lang.Object
rea.components.Component
- All Implemented Interfaces:
Element
- Direct Known Subclasses:
Place
,Positionable
Abstract class common to all classes implementing the game map structure.
Defines methods required by those classes and provides general methods.
- Author:
- José Paulo Leal
jpleal@fc.up.pt
- Implementation Note:
- Corresponds to the Component in the Composite design pattern.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
Constructor Details
-
Component
Create a component.- Parameters:
image
- visual representation of the componentdescription
- description of the component
-
-
Method Details
-
getVisual
Get the visual representation of the component.- Returns:
- the visual representation of the component
-
getDescription
Get the description of the component.- Returns:
- the description of the component
-
toString
Show component as a string using its description.
-