Class Coin
java.lang.Object
nz.ac.vuw.ecs.swen225.gp6.domain.TileAnatomy.AbstractTile
nz.ac.vuw.ecs.swen225.gp6.domain.TileGroups.Item
nz.ac.vuw.ecs.swen225.gp6.domain.Tiles.Coin
- All Implemented Interfaces:
Tile
Coin class is a collectible item in the game that the hero must collect to be able to finish the
level. The term coin and treasure are used interchangeably throughout the code.
-
Field Summary
Fields inherited from class nz.ac.vuw.ecs.swen225.gp6.domain.TileAnatomy.AbstractTile
info -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidSets the given tile t instead of this tile on maze, changing the domain to do so.type()Each tile object will hold a reference to one TileState enum, which determines the behaviour of a number of the tiles important methods.Methods inherited from class nz.ac.vuw.ecs.swen225.gp6.domain.TileGroups.Item
obstructsEnemy, replaceWithMethods inherited from class nz.ac.vuw.ecs.swen225.gp6.domain.TileAnatomy.AbstractTile
info, symbolMethods 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, obstructsHero, ping
-
Constructor Details
-
Coin
Create a coin.- Parameters:
info- tile information
-
-
Method Details
-
type
Description copied from interface:TileEach tile object will hold a reference to one TileState enum, which determines the behaviour of a number of the tiles important methods.- Returns:
- the enum type of this tile, if custom tile then TileType.Other is returned.
-
setOn
Description copied from interface:TileSets the given tile t instead of this tile on maze, changing the domain to do so. NOTE1: may alter domain. NOTE2: does not check wether it's possible for tile t to move on this tile(thoroughly)! Although often it has a set of exceptions that will be thrown if a completely unexpected input is given.
if not implemented defaults to replacing this tile with given tile on maze.
-