Class MazeGenerator
java.lang.Object
games.stendhal.server.maps.quests.maze.MazeGenerator
A random maze zone.
-
Constructor Summary
Constructors -
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 voidrewardPlayer(Player player)Give the player a reward, and notify him.voidsetReturnLocation(String zoneName, int x, int y)Set the location where a player logging out or returning via a portal should be placed.voidSet the sign for hall of fame.voidStart 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
-