|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.caff.maze.MazeTool
public abstract class MazeTool
Create mazes and find ways.
![]() |
![]() |
Field Summary | |
---|---|
static int |
LATEST_VERSION
Constant to be used for access to the latest maze tool version. |
static java.lang.String |
MESSAGE_CREATING
I18n resource for creation message. |
Constructor Summary | |
---|---|
MazeTool()
|
Method Summary | |
---|---|
boolean |
createMaze(Maze maze,
ProgressShower progressShower)
Create a maze with the current time as random number seed. |
abstract boolean |
createMaze(Maze maze,
ProgressShower progressShower,
long seed)
Create a maze with the given random number seed. |
static int |
getCurrentMazeAlgorithmVersion()
Get the current version of the maze tool. |
static MazeTool |
getMazeTool()
Get the current (latest) version of the maze tool. |
static MazeTool |
getMazeTool(int version)
Get a special version of a maze tool. |
protected static boolean |
setProgress(ProgressShower progressShower,
int value)
Set the progress display if a progress shower is given. |
static java.util.Collection<MazeCell> |
solveMaze(MazeCell from,
MazeCell to)
Find a way from one cell of a maze to another. |
protected static void |
startProgress(ProgressShower progressShower,
int size)
Start the progress display if a progress shower is given. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String MESSAGE_CREATING
public static final int LATEST_VERSION
Constructor Detail |
---|
public MazeTool()
Method Detail |
---|
public static MazeTool getMazeTool(int version)
version
- tool version
null
if there is no such versionpublic static MazeTool getMazeTool()
public static int getCurrentMazeAlgorithmVersion()
public boolean createMaze(Maze maze, ProgressShower progressShower)
maze
- maze geometry infoprogressShower
- progress display (may be null
)
true
: maze was created, false
: user canceled the creationpublic abstract boolean createMaze(Maze maze, ProgressShower progressShower, long seed)
maze
- maze geometry infoprogressShower
- progress display (may be null
)seed
- random number seed
true
: maze was created, false
: user canceled the creationpublic static java.util.Collection<MazeCell> solveMaze(MazeCell from, MazeCell to)
from
- cell where the way startsto
- cell where the way ends
null
if there is no way between the cellsprotected static void startProgress(ProgressShower progressShower, int size)
progressShower
- progress shower or null
size
- progress complete sizeprotected static boolean setProgress(ProgressShower progressShower, int value)
progressShower
- progress shower or null
value
- current progress value
true
if the user aborted the creation, otherwise false
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |