These definitions specify the state of the world and the type of available robots prior to the start of execution. As such, a define block must occur before an execute block.
define
{
WorldEntity sample_world
{
wall from 2,2 north for 10;
}
NewRobotType sample_bot
{
IsLikeA basic_bot;
DefineInitialBeepers 5;
DefineNewInstruction turnright as
{
iterate 3 times TurnLeft;
}
}
}
execute
{
place sample_world at 0,0;
new sample_bot mybot at 5,8;
tell mybot: turnright;
remove mybot;
}
You can also go:
Created on 20 August 1996
Last revised 20 August 1996