Class MazeGenerator
java.lang.Object
games.stendhal.server.maps.quests.maze.MazeGenerator
A random maze zone.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAccess the portal from MazeTest.Get the location where to teleport a player.getZone()
Get the zone generated by this maze instance.protected void
rewardPlayer(Player player)
Give the player a reward, and notify him.void
setReturnLocation(String zoneName, int x, int y)
Set the location where a player logging out or returning via a portal should be placed.void
Set the sign for hall of fame.void
Start timing how long the player takest to solve the maze.
-
Constructor Details
-
MazeGenerator
Create a maze.- Parameters:
name
- Name of the maze to be used as the zone namewidth
- Width of the generated zoneheight
- Height of the generated zone
-
-
Method Details
-
getStartPosition
Get the location where to teleport a player.- Returns:
- the intended starting location of the maze
-
setReturnLocation
Set the location where a player logging out or returning via a portal should be placed.- Parameters:
zoneName
- Name of the return zonex
- X coordinatey
- Y coordinate
-
setSign
Set the sign for hall of fame.- Parameters:
sign
- sign
-
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
Give the player a reward, and notify him.- Parameters:
player
-
-
getPortal
Access the portal from MazeTest.- Returns:
- the exit portal
-