Environments
Class Agent

java.lang.Object
  |
  +--Environments.Agent
All Implemented Interfaces:
Drawable
Direct Known Subclasses:
Agent25

public class Agent
extends java.lang.Object
implements Drawable

This class is used to represent an agent into a Woods Environment.

Author:
Olivier Sigaud and Pierre Gérard.

Field Summary
protected  Environments.Coords current
           
 
Constructor Summary
Agent()
           
 
Method Summary
 Environments.Coords getCoords()
           
 double getX()
          Get the X coordinate of the Drawable Object
 int getXI()
           
 double getY()
          Get the X coordinate of the Drawable Object
 int getYI()
           
 void goTo(Environments.Coords c)
           
 void goTo(short x, short y)
           
 boolean isIn(short x, short y)
           
 void move(byte action, short xSize, short ySize)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

current

protected Environments.Coords current
Constructor Detail

Agent

public Agent()
Method Detail

goTo

public void goTo(short x,
                 short y)
Parameters:
x -
y -

goTo

public void goTo(Environments.Coords c)
Parameters:
c -

isIn

public boolean isIn(short x,
                    short y)
Parameters:
x -
y -
Returns:
boolean

getXI

public final int getXI()
Returns:
int

getYI

public final int getYI()
Returns:
int

getCoords

public final Environments.Coords getCoords()
Returns:
Environments.Coords

getX

public double getX()
Description copied from interface: Drawable
Get the X coordinate of the Drawable Object

Specified by:
getX in interface Drawable
Returns:
double

getY

public double getY()
Description copied from interface: Drawable
Get the X coordinate of the Drawable Object

Specified by:
getY in interface Drawable
Returns:
double

move

public void move(byte action,
                 short xSize,
                 short ySize)
Parameters:
action -
xSize -
ySize -

toString

public final java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
String