Class ExitDoorOpen

All Implemented Interfaces:
Tile

public class ExitDoorOpen extends Door
A class representing an exit door that represents the exit door when all coins/treasures are collected and the player can pass through it to pass the level.
  • Field Summary

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

    info
  • Constructor Summary

    Constructors
    Constructor
    Description
    Create an open exit door open tile.
  • Method Summary

    Modifier and Type
    Method
    Description
    gets the colour of the key of the door (none if not a coloured door, e.g exit door)
    boolean
    Check if the hero is on the tile.
    boolean
    Checks wether this tile is an obstruction for enemy tile ,in a given domain.
    boolean
    Checks wether this tile is an obstruction for hero tile ,in a given domain.
    void
    setOn(Tile t, Domain d)
    Sets the given tile t instead of this tile on maze, changing the domain to do so.
    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, ping, replaceWith
  • Constructor Details

    • ExitDoorOpen

      public ExitDoorOpen(TileInfo info)
      Create an open exit door open 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.
    • color

      public Key.KeyColor color()
      Description copied from class: Door
      gets the colour of the key of the door (none if not a coloured door, e.g exit door)
      Specified by:
      color in class Door
      Returns:
      the colour of the key of the door (or none)
    • heroOn

      public boolean heroOn()
      Check if the hero is on the tile.
      Returns:
      true if hero is on the tile, false otherwise
    • 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.
      Specified by:
      obstructsEnemy in interface Tile
      Overrides:
      obstructsEnemy in class Door
      Parameters:
      d - game domain to check on
      Returns:
      true if obstructs enemy, if not implemented, defaults to false.
    • obstructsHero

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

      public void setOn(Tile t, Domain d)
      Description copied from interface: Tile

      Sets 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.

      Specified by:
      setOn in interface Tile
      Overrides:
      setOn in class Door
      Parameters:
      t - tile to replace this tile with, can not be null.
      d - domain where this change is happening, can not be null.