Misc. RoBOTL Information


This page is devoted to giving the information which doesn't really fall into any of the other sections of the reference guide.

General RoBOTL Information


The Map of RoBOTL

The RoBOTL Map is 20x20 (by default, the size can change by use of the DefineMapSize statement), and can hold robots, beepers, blocks, and walls.

The map is broken into squares, each of which are uniquely identified by the use of Coordinates.


Names

Names are defined as a letter ("a"-"z","A"-"Z") followed by zero to thirty letters, numbers ("0"-"9"), and underscores ("_"). For example: Pete_Bot, Q, and smart_bot_1 are all valid names. Invalid names include 1bot, smarty!, and _a-bot.

Names can NOT be one of the RoBOTL Reserved Words.


Coordinates

Coordinates are simply an ordered pair ( X, Y ) that uniquely identifies a square on the RoBOTL map. The lower-left square is ( 0, 0 ), and (by default) the upper-right square is ( 19, 19 ). See a sample map for an example.


Directions

Each robot comes equipped with a magnetic compass which tells the robot which direction it is facing. Initially, the robot is created facing eastward (arbitrarily chosen), and the robot can only turn in 90° increments, so the only valid directions are the standard compass directions: North, East, South, West.


Reserved Words

There are a number of keywords which are used by RoBOTL, and therefore, can't be used as a Name. That list is:


Instruction/Statement Groupings

You can simply use a single instruction or statement without doing anything special. (ie: 'iterate 3 times turnleft;' is perfectly fine.) However, when you want to perform a set of instructions or statements that are related, you put them within a set of curly braces ("{" and "}".) For instance:

When telling a robot to do something, you wouldn't use:

tell robot: turnleft;
tell robot: move 1;

You'd group the related instructions together like this:


tell robot: {
     turnleft;
     move 1;
}


Comments

While comments are not specified in the RoBOTL grammar, the RoBOTL JAVA Applet (1.0) does support single and multi-line comments, using the standard C++ convention:

// The double-slash is used for a single line comment.

/* The slash-star-star-slash method is used for multiple
   line comments. */


Rules of Placement


This guide is not great to look at under text-only browsers. Sorry. Since you need a graphical browser for the applet, we figured you'd be using it for the reference guide.

Document Last Revised: Tuesday December 16th, 1997 at 2:03am
Copyright ©1997 Worcester Polytechnic Institute
Page Written by: Theo Van Dinter (felicity@kluge.net)