Amazing Mazes

Class ScatterBrained

java.lang.Object
  |
  +--Mouse
        |
        +--ScatterBrained

public class ScatterBrained
extends Mouse

The ScatterBrained mouse will use a strategy that moves in a random direction. Because it is derived from the base class Mouse, it has no memory.

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

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

Constructor Detail

ScatterBrained

public ScatterBrained()
Method Detail

makeAMove

protected Direction makeAMove()
For each turn the makeAMove method is called. The ScatterBrained mouse will use a strategy that moves in a random direction.
Overrides:
makeAMove in class Mouse
Returns:
the direction that we should move.

Author: Andrew Bridges
Copyright © 2001