Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Label 1: moveForward();
- moveForward();
- Label 2 :
- moveForward();
- turnLeft();
- moveForward();
- turnRight();
- moveForward();
- Label 3:
- while (notDone()) {
- moveForward();
- }
- label 4:
- while (notDone()) {
- moveForward();
- turnLeft();
- moveForward();
- turnRight();
- }
- label 5:
- moveForward();
- moveForward();
- turnLeft();
- while (notDone()) {
- moveForward();
- }
- label 6:
- while (notDone()) {
- moveForward();
- if (isPathLeft()) {
- turnLeft();
- }
- }
- label 7:
- while (notDone()) {
- moveForward();
- if (isPathRight()) {
- turnRight();
- }
- }
- label 8:
- while (notDone()) {
- moveForward();
- if (isPathLeft()) {
- turnLeft();
- }
- if (isPathRight()) {
- turnRight();
- }
- }
- label9:
- while (notDone()) {
- moveForward();
- if (isPathForward()) {
- moveForward();
- } else {
- turnLeft();
- }
- }
- label 10:
- moveForward();
- moveForward();
- turnLeft();
- while (notDone()) {
- if (isPathForward()) {
- moveForward();
- if (isPathRight()) {
- turnRight();
- }
- } else {
- turnLeft();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement