Amazing Mazes

Class FocusedL

java.lang.Object
  |
  +--Mouse
        |
        +--Smarty
              |
              +--FocusedL

public class FocusedL
extends Smarty

The FocusedL mouse will use a strategy that moves in the same direction (if possible) turning left if blocked. Because it is derived from the base class Smarty, it has a memory.

Version:
1.0 11/25/2000
Author:
Andrew Bridges ... Copyright (c) 2001

Fields inherited from class Mouse
curPosition_, mazeAdapter_, stack_
 
Constructor Summary
FocusedL()
           
 
Method Summary
protected  Direction makeAMove()
          For each turn the makeAMove method is called.
 
Methods inherited from class Smarty
advance, retreat
 
Methods inherited from class Mouse
distanceToGoal, passagewayOpenAt, randomInt, solveMaze
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Constructor Detail

FocusedL

public FocusedL()
Method Detail

makeAMove

protected Direction makeAMove()
For each turn the makeAMove method is called. The FocusedL mouse will use a strategy that moves in the same direction (if possible) turning left if blocked.
Overrides:
makeAMove in class Mouse
Returns:
the direction that we should move.

Author: Andrew Bridges
Copyright © 2001