Player class

This is the superclass for all Players.

Your program should be written in a subclass of this class.





direction Direction
The direction of this actor.
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
image BitmapData
Returns this actor's current image.
read-only, override
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
world World
A reference to the world.
read / write, inherited
x int
The horizontal position.
read / write, inherited
y int
The vertical position.
read / write, inherited
zIndex int
The stack order of this element.
read-only, override


boxFront() bool
The player checks if there is a box in front.
canMove() bool
The player checks if he/she can move to the next field.
move() → void
The player makes a step in the current direction.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
onStar() bool
The player checks if he/she is on a star.
putStar() → void
The player adds a star.
removeStar() → void
The player removes a star.
say(String text, [num seconds = 3]) → void
Creates a speech bubble with the specified text. [...]
start() → void
The start method where you can write your program.
stop() → void
Stops the execution.
toString() String
A string representation of this object. [...]
treeFront() bool
The player checks if there is a tree in front.
treeLeft() bool
The player checks if there is a tree on the left side.
treeRight() bool
The player checks if there is a tree on the right side.
turnLeft() → void
The player turns left by 90 degrees.
turnRight() → void
The player turns right by 90 degrees.


operator ==(Object other) bool
The equality operator. [...]