public abstract class HumanAgent extends Agent
Modifier and Type | Field and Description |
---|---|
protected java.awt.Color |
color
The
Color of the agent. |
protected double |
mass
The mass (kilograms) of the agent.
|
position
map
Constructor and Description |
---|
HumanAgent(Position position,
double radius,
double mass,
java.awt.Color color)
Creates a human agent.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
communicate(CommunicationType type,
java.lang.Object communication)
Communicate.
|
java.awt.Color |
getColor()
Gets the
Color . |
double |
getMass()
Gets the mass.
|
java.lang.String |
toString() |
getObservation, init, setLog, update, wantsToBeDestoryed, writeLog
getRadius, getVectorToPosition, isLineCollision
getDistance, getPosition
isDestroyed
protected java.awt.Color color
Color
of the agent.protected double mass
public HumanAgent(Position position, double radius, double mass, java.awt.Color color)
position
- The position on the map.radius
- The radius.mass
- The mass.color
- The color.public abstract void communicate(CommunicationType type, java.lang.Object communication)
type
- The type of communication.communication
- The communication.public java.awt.Color getColor()
Color
.public double getMass()
public java.lang.String toString()
toString
in class java.lang.Object