public class Food
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.Object |
id
The space object id of the food.
|
protected int |
x
The x coordinate relative to perceiving creature.
|
protected int |
y
The x coordinate relative to perceiving creature.
|
Constructor and Description |
---|
Food(java.lang.Object id,
int x,
int y)
Create a food percept.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getId()
Get the space object id of the food.
|
int |
getX()
Get the x coordinate relative to the perceiving creature.
|
int |
getY()
Get the y coordinate relative to the perceiving creature.
|
void |
setId(java.lang.Object id)
Set the space object id.
|
void |
setX(int x)
Set the x coordinate relative to the perceiving creature.
|
void |
setY(int y)
Set the y coordinate relative to the perceiving creature.
|
protected java.lang.Object id
protected int x
protected int y
public java.lang.Object getId()
public void setId(java.lang.Object id)
public int getX()
public void setX(int x)
public int getY()
public void setY(int y)