Interface IEnvironment
- 
- All Known Implementing Classes:
- Environment
 
 public interface IEnvironmentInterface for the hunter-prey environment. Defines all operations that a hunter or prey may perform.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description booleaneat(Creature me, WorldObject food)Eat some object.VisiongetVision(Creature me)Get the current vision.booleanmoveDown(Creature me)Move one field downwards.booleanmoveLeft(Creature me)Move one field to the left.booleanmoveRight(Creature me)Move one field to the right.booleanmoveUp(Creature me)Move one field upwards.
 
- 
- 
- 
Method Detail- 
moveUpboolean moveUp(Creature me) Move one field upwards. The method will block until the current simulation step has finished.- Returns:
- True, when the operation succeeded.
 
 - 
moveDownboolean moveDown(Creature me) Move one field downwards. The method will block until the current simulation step has finished.- Returns:
- True, when the operation succeeded.
 
 - 
moveLeftboolean moveLeft(Creature me) Move one field to the left. The method will block until the current simulation step has finished.- Returns:
- True, when the operation succeeded.
 
 - 
moveRightboolean moveRight(Creature me) Move one field to the right. The method will block until the current simulation step has finished.- Returns:
- True, when the operation succeeded.
 
 - 
eatboolean eat(Creature me, WorldObject food) Eat some object. The object has to be at the same location. This method does not block, and can be called multiple times during each simulation step.- Parameters:
- food- The object.
- Returns:
- True, when the operation succeeded.
 
 
- 
 
-