|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--de.uni_paderborn.robots.data.Field
A field in the arena.
| Field Summary | |
private Fields |
fields
link to Fields object |
private int |
id
ID of field |
private Item |
item
the item on the field |
static long |
serialVersionUID
used for serialization |
private int |
x
x-coordinate in matrix representation |
private int |
y
y-coordinate in matrix representation |
| Constructor Summary | |
Field(Fields fields,
int x,
int y,
Item item)
constructor, creates a new field. |
|
| Method Summary | |
Fields |
getFields()
Returns the Fields object. |
int |
getID()
Returns ID of the field. |
Item |
getItem()
Returns the item on the field, null is used, if field is empty. |
int |
getX()
Returns x-coordinate in matrix represenation of field. |
int |
getY()
Returns x-coordinate in matrix represenation of field. |
void |
setItem(Item item,
ArenaCanvas arenaCanvas)
Sets the item of the field, null is used, if field is empty. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
public static final long serialVersionUID
private Fields fields
private Item item
private int x
private int y
private int id
| Constructor Detail |
public Field(Fields fields,
int x,
int y,
Item item)
fields - link to Fields objectx - x-coordinate in matrix representationy - y-coordinate in matrix representationitem - item on the field| Method Detail |
public Item getItem()
public void setItem(Item item,
ArenaCanvas arenaCanvas)
item - new item on the fieldarenaCanvas - ArenaCanvas object which needs to be updatedpublic int getID()
getID in interface Identifyablepublic int getX()
public int getY()
public Fields getFields()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||