Class GreenLock

All Implemented Interfaces:
Tile

public class GreenLock extends Door
A class representing a green lock that can be unlocked by a green key.
  • Constructor Details

    • GreenLock

      public GreenLock(TileInfo info)
      Create a green lock.
      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)