simuLCS
Class AgentDuck

java.lang.Object
  extended bysimuLCS.Entity
      extended bysimuLCS.Agent
          extended bysimuLCS.AgentDuck

public class AgentDuck
extends Agent

Agent moving according to R. Vaughan's mathematical model.

Author:
Benoit

Field Summary
protected  double k1
           
protected  double k2
           
protected  double k3
           
protected  double k4
           
protected  Vector2D lastMovVector
           
protected  double parameterL
           
 
Fields inherited from class simuLCS.Agent
arena, heading, oldcoord
 
Fields inherited from class simuLCS.Entity
color_ext, color_int, coord, generator, name, paintName, size
 
Constructor Summary
AgentDuck(java.util.Random gen, Arena a)
           
AgentDuck(java.util.Random gen, Arena a, java.lang.String name)
           
 
Method Summary
 boolean isDangerous()
          An agent duck is not dangerous, by convention.
 void move(Arena a, Entity[] others, int nbEntities, java.awt.Graphics2D g)
          Moves the Agent according to the equation giving the movement vector
 
Methods inherited from class simuLCS.Agent
clear, clear, getArena, getBehaviour, getBehaviour, getCoordNearTo, getRadius, isMoving, move, paint, toString
 
Methods inherited from class simuLCS.Entity
collideWithMe, distanceTo, getColor_ext, getColor_int, getCoord, getId, getName, getRadiusBody, getSize, isPaintName, setColor_ext, setColor_int, setName, setPaintName, setSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

k1

protected double k1

k2

protected double k2

k3

protected double k3

k4

protected double k4

parameterL

protected double parameterL

lastMovVector

protected Vector2D lastMovVector
Constructor Detail

AgentDuck

public AgentDuck(java.util.Random gen,
                 Arena a)

AgentDuck

public AgentDuck(java.util.Random gen,
                 Arena a,
                 java.lang.String name)
Method Detail

move

public void move(Arena a,
                 Entity[] others,
                 int nbEntities,
                 java.awt.Graphics2D g)
Moves the Agent according to the equation giving the movement vector

Overrides:
move in class Agent
See Also:
Entity.move(Arena, Entity[], int, Graphics2D)

isDangerous

public boolean isDangerous()
An agent duck is not dangerous, by convention.

Overrides:
isDangerous in class Agent