Karel World
Represents the FOP Bot world on a graphical user interface.
Properties
Link copied to clipboard
public long actionLimit
The maximum number of actions that can be performed in this world.
Link copied to clipboard
The fields of this world.
Functions
Link copied to clipboard
Validates that the number of coins is not negative.
Link copied to clipboard
Validates if the specified X coordinate is within the world.
Link copied to clipboard
Validates if the specified Y coordinate is within the world.
Link copied to clipboard
Returns the amount of traces stored.
Link copied to clipboard
Returns the maximum amount of traces to be stored.
Link copied to clipboard
Returns all field entities on this world.
Link copied to clipboard
Returns all entity states (fields) of this world.
Link copied to clipboard
Returns the color of the field at the specified coordinates or
null
if no color is set.Link copied to clipboard
Returns the GuiPanel of this world.
Link copied to clipboard
Returns the InputHandler of this world.
Link copied to clipboard
Returns the amount of robots in this world.
Link copied to clipboard
Link copied to clipboard
Returns the previous robot tracing of the specified robot.
Link copied to clipboard
Returns the previous robots tracing.
Link copied to clipboard
Returns
true
if the specified robot is located at the specified coordinate.Link copied to clipboard
Returns
true
if a block is at the specified coordinate.Link copied to clipboard
Returns
true
if at least one coin is on the specified coordinate.Link copied to clipboard
Returns true if turned off robots are drawn.
Link copied to clipboard
Returns
true
if a wall and its orientation is on the specified field.Link copied to clipboard
Load all images for displaying FoPBot if required.
Link copied to clipboard
Places a block at the specified coordinate.
Link copied to clipboard
Places a horizontal wall at the specified coordinate.
Link copied to clipboard
Places a vertical wall at the specified coordinate.
Link copied to clipboard
Sets the maximum amount of traces to be stored.
Link copied to clipboard
public void setAndLoadRobotImages(Class<? extends Robot> robotClass, InputStream turnedOn, InputStream turnedOff, int rotationOffsetOn, int rotationOffsetOff)
Loads robot images for a specific robot class.
Link copied to clipboard
public void setAndLoadRobotImagesById(String imageId, InputStream turnedOn, InputStream turnedOff, int rotationOffsetOn, int rotationOffsetOff)
Loads robot images for a specific image identification.
Link copied to clipboard
Sets whether turned off robots should be drawn.
Link copied to clipboard
Sets the color of the field at the specified coordinates.
Link copied to clipboard
Sets the GuiPanel of this world.
Link copied to clipboard
Sets the visibility of the world on the graphical user interface to the specified visibility value.
Link copied to clipboard
Triggers that an update of the graphical user interface is needed.
Link copied to clipboard
Updates the entity array to be in sync with the robots X and Y coordinates.