toggle menu
FOPBot
0.7.1-SNAPSHOT
jvm
switch theme
search in API
FOPBot
/
fopbot
/
Field
Field
public
class
Field
(
source
)
A single field in a 2D world where field entities can be placed.
See also
Field
Entity
Members
Constructors
Field
Link copied to clipboard
public
void
Field
(
KarelWorld
world
,
int x
,
int y
)
Constructs a field with the given coordinate and no entities on it.
public
void
Field
(
KarelWorld
world
,
int x
,
int y
,
List
<
FieldEntity
>
entities
)
Constructs a field with the given coordinate and the specified entities on it.
Properties
entities
Link copied to clipboard
public
final
List
<
FieldEntity
>
entities
Contains all entities that are on this field.
field
Color
Link copied to clipboard
@
Nullable
(
)
public
@
Nullable
(
)
Color
fieldColor
world
Link copied to clipboard
public
final
KarelWorld
world
x
Link copied to clipboard
public
final
int
x
y
Link copied to clipboard
public
final
int
y
Functions
get
Entities
Link copied to clipboard
public
List
<
FieldEntity
>
getEntities
(
)
Returns the entities that are on this field.
get
Field
Color
Link copied to clipboard
@
Nullable
(
)
public
@
Nullable
(
)
Color
getFieldColor
(
)
Returns the background color of this
Field
.
get
World
Link copied to clipboard
public
KarelWorld
getWorld
(
)
Returns the world of this field.
get
X
Link copied to clipboard
public
int
getX
(
)
Returns the x-coordinate of this field.
get
Y
Link copied to clipboard
public
int
getY
(
)
Returns the y-coordinate of this field.
set
Field
Color
Link copied to clipboard
public
void
setFieldColor
(
@
Nullable
(
)
@
Nullable
(
)
Color
fieldColor
)
Sets the background color of this
Field
to the specified color.