simuLCS
Class Food

java.lang.Object
  extended bysimuLCS.Entity
      extended bysimuLCS.Food

public class Food
extends Entity

Entity non-moving and not dangerous, used to test the reactions of the Agent.

Author:
Benoit

Field Summary
protected  Arena arena
          Link to the Arena where the agent is placed.
 
Fields inherited from class simuLCS.Entity
color_ext, color_int, coord, generator, name, paintName, size
 
Constructor Summary
Food(java.util.Random gen, Arena a)
           
 
Method Summary
 boolean isDangerous()
          Returns the value of the Dangerous flag for the food (false).
 boolean isMoving()
          The food is not moving.
 void move(Arena a, Entity[] others, int nbagents, java.awt.Graphics2D g)
          Food does not move.
 
Methods inherited from class simuLCS.Entity
clear, collideWithMe, distanceTo, getColor_ext, getColor_int, getCoord, getCoordNearTo, getId, getName, getRadiusBody, getSize, isPaintName, paint, setColor_ext, setColor_int, setName, setPaintName, setSize, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

arena

protected Arena arena
Link to the Arena where the agent is placed.

Constructor Detail

Food

public Food(java.util.Random gen,
            Arena a)
Method Detail

isDangerous

public boolean isDangerous()
Returns the value of the Dangerous flag for the food (false).

Specified by:
isDangerous in class Entity
Returns:
See Also:
Entity.isDangerous()

isMoving

public boolean isMoving()
The food is not moving.

Specified by:
isMoving in class Entity
Returns:
See Also:
Entity.isMoving()

move

public void move(Arena a,
                 Entity[] others,
                 int nbagents,
                 java.awt.Graphics2D g)
Food does not move.

Specified by:
move in class Entity
Parameters:
a - The Arena inside which to move
g - Graphics
See Also:
Entity.move(Arena, Entity[], int, java.awt.Graphics2D)