Go to the first, previous, next, last section, table of contents.


Reference

World num_streets num_avenues
World 5 5

The World command defines a world that is 5 avenues wide by 5 streets high.

Beepers street avenue number
Beepers 3 3 1

The beeper command places a number of beepers on an intersection. In this case, one beeper would be placed on the intersection {3, 3}

Robot street avenue direction num_beepers
Robot 4 3 1 0

The robot starting position is defined with the Robot command. In this example, the robot starts at {4, 3}, facing North (1), with zero beepers in his beeper bag.

Wall street avenue direction
Wall 2 2 1

The Wall command places a wall section in Karel's world. Each wall section is one block long. Walls can either be north or west of an intersection (1 or 4 respectively). In this example, a horizontal wall is placed directly north of the intersection {2, 2}.


Go to the first, previous, next, last section, table of contents.