|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.almacha.achamaze.MazeSolvingAlgorithm
org.almacha.achamaze.PledgeAlgorithm
public class PledgeAlgorithm
An implementation of the Pledge Maze Solving Algorithm. See http://en.wikipedia.org/wiki/Maze_solving_algorithm#Pledge_algorithm
| Field Summary | |
|---|---|
private boolean |
followingWall
|
private Direction |
going
|
private int |
rotation
|
| Constructor Summary | |
|---|---|
PledgeAlgorithm(PlayerStateForMazeAlgo playerState)
|
|
| Method Summary | |
|---|---|
protected Direction |
decide()
This method decides in which direction the player should go. |
private void |
left()
|
private void |
right()
|
| Methods inherited from class org.almacha.achamaze.MazeSolvingAlgorithm |
|---|
getPlayerState, move |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private boolean followingWall
private int rotation
private Direction going
| Constructor Detail |
|---|
public PledgeAlgorithm(PlayerStateForMazeAlgo playerState)
| Method Detail |
|---|
private void right()
private void left()
protected Direction decide()
MazeSolvingAlgorithm
decide in class MazeSolvingAlgorithm
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||