Class MazeGenerator

java.lang.Object
games.stendhal.server.maps.quests.maze.MazeGenerator

public class MazeGenerator extends Object
A random maze zone.
  • Constructor Details

    • MazeGenerator

      public MazeGenerator(String name, int width, int height)
      Create a maze.
      Parameters:
      name - Name of the maze to be used as the zone name
      width - Width of the generated zone
      height - Height of the generated zone
  • Method Details

    • getStartPosition

      public Point getStartPosition()
      Get the location where to teleport a player.
      Returns:
      the intended starting location of the maze
    • setReturnLocation

      public void setReturnLocation(String zoneName, int x, int y)
      Set the location where a player logging out or returning via a portal should be placed.
      Parameters:
      zoneName - Name of the return zone
      x - X coordinate
      y - Y coordinate
    • setSign

      public void setSign(MazeSign sign)
      Set the sign for hall of fame.
      Parameters:
      sign - sign
    • getZone

      public StendhalRPZone getZone()
      Get the zone generated by this maze instance.
      Returns:
      The generated zone
    • startTiming

      public void startTiming()
      Start timing how long the player takest to solve the maze.
    • rewardPlayer

      protected void rewardPlayer(Player player)
      Give the player a reward, and notify him.
      Parameters:
      player -
    • getPortal

      public Portal getPortal()
      Access the portal from MazeTest.
      Returns:
      the exit portal