edu.ou.pacman.client
Class DepthFirstClient
java.lang.Object
edu.ou.pacman.client.AbstractPacmanClient
edu.ou.pacman.client.DepthFirstClient
- All Implemented Interfaces:
- Client<ImmutablePacmanState,ImmutablePacmanCharacter,Direction>
public class DepthFirstClient
- extends AbstractPacmanClient
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DepthFirstClient
public DepthFirstClient()
startAction
public Direction startAction(ImmutablePacmanState world,
ImmutablePacmanCharacter client)
DFS
public Direction DFS(javax.swing.tree.DefaultMutableTreeNode tree,
ImmutablePacmanState world,
ImmutablePacmanCharacter client,
Location2D goalLocation)
- Method to recursively search a node following Depth First Search protocol. New locations added
to the tree are assumed to be +/- 1, which isn't fully correct as you can wrap around the board.
- Parameters:
tree
- - The tree holding the locationsworld
- - The world stateclient
- - The client you are guidinggoalLocation
- - The location you would like to reach
- Returns:
- The direction to take to get from the root node to the second node in the path.
endAction
public void endAction(ImmutablePacmanState world,
ImmutablePacmanCharacter client)
initialize
public void initialize(java.io.File config)
loadData
public void loadData(java.io.File data)
shutdown
public void shutdown()