maze
Class Strategy
- public abstract class Strategy
Title: Strategy
Description: An abstract class that defines a strategy for performing an algorithm on a maze
Copyright: Copyright (c) 2002
Company:
- Version:
- 1.0
- Author:
- Zoran Budimlic
DFS
public static final Strategy DFS
- A Singleton for depth-first search strategy. Instead of initializing DFS to Clear, you should change this assignment to assign a new instance of whatever class you design to implement the depth-first search.
BFS
public static final Strategy BFS
- A Singleton for breadth-first search strategy. Instead of initializing BFS to Clear, you should change this assignment to assign a new instance of whatever class you design to implement the breadth-first search.
AStar
public static final Strategy AStar
- A Singleton for A* search strategy. Instead of initializing AStar to Clear, you should change this assignment to assign a new instance of whatever class you design to implement the A* search.
MazeGen
public static final Strategy MazeGen
- A Singleton for maze generation strategy. Instead of initializing MazeGen to Clear, you should change this assignment to assign a new instance of whatever class you design to implement the completely connected maze generation.
Clear
public static final Strategy Clear
- A Singleton for clearing the maze. This is an example of a strategy that is already implemented. You should initialize the other strategy singletons in a similar manner.
execute
public abstract void execute(Maze maze)
- A strategy method. You should define this method in the subclasses to execute a particular algorithm on a maze - maze generation, DFS, BFS or A* traversal