Introduction
There are limited commands in Little Turtle for younger students. They are limited versions of the move, left, and right commands.
- M (move 2 steps)
- L (turn left 45°)
- R (turn right 45°)
Note: The color, size, up, down, home, xy, bearing, and circle commands are not effected.
Enable the Limited Commands
The limited commands are disabled in Little Turtle. There are two ways to enable them.1. To permently enable the limited commands, edit the file turtle.js and change the global variable cmdLimited to true.2. To temporarily enable the limited commands, add a parameter to the URL.
http://server/turtle.html?limited M (move 2 steps)
The M command moves the sprite 2 steps in the current direction.
Command Example
M Note: The number of steps is fixed.L (turn left 45°)
The L commands turns the sprite 45° to the left from the current direction.
Command Example
L Note: The turn angle is fixed.R (turn right 45°)
The R commands turns the sprite 45° to the right from the current direction.
Command Example
R Note: The turn angle is fixed.Snap to Grid
To limit confusion by younger students when drawing lines at an angle, lines are "snapped to the grid".
The following shows the difference between normal commands and limited commands doing the same operation.
Normal Limited R 3 M 4
R M M