Class AbstractTile
java.lang.Object
nz.ac.vuw.ecs.swen225.gp6.domain.TileAnatomy.AbstractTile
- All Implemented Interfaces:
Tile
This class is the parent class of all tiles in the game. It contains the information of the tile,
and the methods that are common to all tiles.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAbstractTile(TileInfo info) constructor for a tile which takes tile information(currently all tiles take this). -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface nz.ac.vuw.ecs.swen225.gp6.domain.TileAnatomy.Tile
damagesHero, obstructsEnemy, obstructsHero, ping, replaceWith, setOn, type
-
Field Details
-
info
-
-
Constructor Details
-
AbstractTile
constructor for a tile which takes tile information(currently all tiles take this).- Parameters:
info- tile info- Throws:
NullPointerException- if TileInfo is null
-
-
Method Details
-
info
Description copied from interface:TileEach tile will hold an info object, which stores most "field-like" info that the tile may have. Eg location of tile, number of pings that tile has seen, image name of the tile, etc. This allows us to pass only one parameter when constructing a tile. -
symbol
public char symbol()Description copied from interface:TileEach tile type should have a symbol, this is for testing purposes.
-