APtran Robot

by bh
See Code Download Embed
Simulator for the virtual robot they use on the AP exam.

Set GRID SIZE slider then click green flag to make a new grid.  The turtle shape represents the robot.  There are four kinds of squares:

WHITE: available to move into.
BLACK: a wall, can't be moved into or through.
GREEN: a goal; you win if the robot reaches it.
WHITE WITH (tip of) TURTLE: the location of the robot.  The direction shows the direction of motion.

Clicking in a white square makes it black (a wall), unless you first push one of these buttons:

NEXT CLICK SETS GOAL button means that you want the next white-square click to turn that square green (a goal square).

NEXT CLICK SETS ROBOT button means that you want the next white-square click to put the robot (the turtle) there.  If you push this button repeatedly before pushing a grid square, it changes the initial direction of the robot.

The RESET button puts the robot back in its original position and direction.

Created March 25, 2020

Last updated March 27, 2020

Published March 25, 2020