Class DumbBrain

java.lang.Object
  extended by DumbBrain
All Implemented Interfaces:
IBeastBrain

public class DumbBrain
extends java.lang.Object
implements IBeastBrain

A dumb beast brain that just keeps on with the same direction and emotion.

Author:
CPSC 111 instructors

Constructor Summary
DumbBrain()
           
 
Method Summary
 Direction chooseDirection(BeastInfo info, IPackFinder packFinder)
          Keep going whatever direction you are going.
 BeastMood chooseMood(BeastInfo info, IPackFinder packFinder)
          Choose a neutral mood.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DumbBrain

public DumbBrain()
Method Detail

chooseMood

public BeastMood chooseMood(BeastInfo info,
                            IPackFinder packFinder)
Choose a neutral mood.

Specified by:
chooseMood in interface IBeastBrain
Parameters:
info - information about this beast (what its brain knows about its body/state), must be non-null
packFinder - a pack finder to tell this beast about its pack (must be non-null)
Returns:
a chosen mood to assume next, non-null

chooseDirection

public Direction chooseDirection(BeastInfo info,
                                 IPackFinder packFinder)
Keep going whatever direction you are going.

Specified by:
chooseDirection in interface IBeastBrain
Parameters:
info - information about this beast (what its brain knows about its body/state), must be non-null
packFinder - a pack finder to tell this beast about its pack (must be non-null)
Returns:
a chosen direction to go next (non-null)