All Implemented Interfaces:
Tile

public class Info extends AbstractTile
This class represents a info tile which when only hero can move on, and will display hints for the current level. Each level currently at most can have one of these tiles.
  • Field Summary

    Fields inherited from class nz.ac.vuw.ecs.swen225.gp6.domain.TileAnatomy.AbstractTile

    info
  • Constructor Summary

    Constructors
    Constructor
    Description
    Info(TileInfo info)
    Create a info tile.
  • Method Summary

    Modifier and Type
    Method
    Description
    gets the hint message to be displayed when hero moves on this tile.
    boolean
    Checks wether this tile is an obstruction for enemy tile ,in a given domain.
    when an actor is moved onto this tile, then is to move off of it, replace it with the tile that this method returns.
    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.TileAnatomy.AbstractTile

    info, symbol

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface nz.ac.vuw.ecs.swen225.gp6.domain.TileAnatomy.Tile

    damagesHero, obstructsHero, ping, setOn
  • Constructor Details

    • Info

      public Info(TileInfo info)
      Create a info tile.
      Parameters:
      info - tile information
  • Method Details

    • type

      public TileType type()
      Description copied from interface: Tile
      Each 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.
    • message

      public String message()
      gets the hint message to be displayed when hero moves on this tile.
      Returns:
      hint message
    • obstructsEnemy

      public boolean obstructsEnemy(Domain d)
      Description copied from interface: Tile
      Checks wether this tile is an obstruction for enemy tile ,in a given domain. NOTE: does not alter the domain or this tile in anyway.
      Parameters:
      d - game domain to check on
      Returns:
      true if obstructs enemy, if not implemented, defaults to false.
    • replaceWith

      public Tile replaceWith()
      Description copied from interface: Tile
      when an actor is moved onto this tile, then is to move off of it, replace it with the tile that this method returns.
      Returns:
      tile that is to replace this tile after an actor going over it. If not implemented, defaults to Floor.