Here is the code running in the applet. Not very interesting, actually. The rest of the code (the Applet itself) is here: KarelApplet.java.
class RightTurnRobot extends UrRobot { public RightTurnRobot(int street, int avenue, Direction dir, int beepers) { super(street, avenue, dir, beepers); } public void turnRight() { turnLeft(); turnLeft(); turnLeft(); } } public void task() { RightTurnRobot karel = new RightTurnRobot(3, 3, East, infinity); karel.turnRight(); karel.move(); karel.turnRight(); karel.move(); karel.turnRight(); karel.move(); karel.turnOff(); }
To use this properly you need the instructions for the format required in the text area. However, you can get the world builder and create a few items and then use the "text" button to see what it looks like textually.
Back to the Experimental Page.
Last Updated: May 26, 2006