Rabbit Escape  2017-01-14_18:33:47_+0000__(tag:_v0.10.1)
Public Member Functions | Public Attributes | List of all members
rabbitescape.engine.Behaviour Class Referenceabstract
Inheritance diagram for rabbitescape.engine.Behaviour:
Inheritance graph
[legend]

Public Member Functions

abstract State newState (BehaviourTools t, boolean triggered)
 
abstract boolean behave (World world, Rabbit rabbit, State state)
 
abstract boolean checkTriggered (Rabbit rabbit, World world)
 
abstract void cancel ()
 
void saveState (Map< String, String > saveState)
 
void restoreFromState (Map< String, String > saveState)
 

Public Attributes

boolean triggered
 

Member Function Documentation

abstract boolean rabbitescape.engine.Behaviour.behave ( World  world,
Rabbit  rabbit,
State  state 
)
abstract

Move the rabbit in the world. Kill it, or record its safe exit.

abstract void rabbitescape.engine.Behaviour.cancel ( )
abstract
abstract boolean rabbitescape.engine.Behaviour.checkTriggered ( Rabbit  rabbit,
World  world 
)
abstract

Examine the rabbit's situation and return true if this Behaviour must take control.

abstract State rabbitescape.engine.Behaviour.newState ( BehaviourTools  t,
boolean  triggered 
)
abstract

Subclasses examine the rabbit's situation using BehaviourTools and return the state (see ChangeDescription) for the next time step. This method may return null indicating that a different Behaviour must take over.

Note that the state determines the animation used.

void rabbitescape.engine.Behaviour.restoreFromState ( Map< String, String >  saveState)
void rabbitescape.engine.Behaviour.saveState ( Map< String, String >  saveState)

Member Data Documentation

boolean rabbitescape.engine.Behaviour.triggered

The documentation for this class was generated from the following file: