EAST() SOUTH() SOUTH() EAST() EAST() EAST() NORTH() NORTH() NORTH() NORTH() EAST() EAST() SOUTH()
EAST(5) SOUTH(3) WEST(4) NORTH(3) WEST(1) NORTH(2) EAST(6) SOUTH(2)
FOR i = 1 TO 4 { EAST() NORTH() EAST() SOUTH() } SOUTH(2) WEST(7) SOUTH()
REPEAT { EAST() } UNTIL (ASTEROID AHEAD) REPEAT { SOUTH() } UNTIL (ASTEROID AHEAD) REPEAT { WEST() } UNTIL (ASTEROID AHEAD) REPEAT { NORTH() } UNTIL (ASTEROID AHEAD)
WHILE (ASTEROID AHEAD) { SOUTH() EAST() } EAST() WHILE (ASTEROID AHEAD) { NORTH(2) WEST() } EAST() WHILE (TARGET NOT REACHED) { SOUTH() EAST() }
EAST(2) IF (ASTEROID AHEAD) { NORTH() } EAST() IF (ASTEROID AHEAD) { NORTH() } ELSE { EAST(2) } EAST() IF (ASTEROID AHEAD) { NORTH() } ELSE IF (PLANET AHEAD) { SOUTH(2) } ELSE { EAST(2) }
FUNCTION travel_south() { SOUTH() EAST() SOUTH() EAST() } FUNCTION travel_north() { NORTH() EAST() NORTH() EAST() } travel_north() travel_south() travel_north() travel_south()
function orbit() { SOUTH(2) EAST(3) NORTH(3) WEST(3) SOUTH(3) } EAST() IF (planet AHEAD) { orbit() } EAST(5) NORTH(3) EAST()
function space_travel() { NORTH(2) EAST() SOUTH(4) EAST() NORTH(2) } for i = 1 TO 4 { space_travel() }
FUNCTION space_travel(steps) { FOR i = 1 TO steps { SOUTH() EAST() } } space_travel(3) NORTH(5) space_travel(5)
FUNCTION space_travel(x,y,option) { IF option==TRUE { EAST(x) SOUTH(y) } ELSE { WEST(x) NORTH(y) } } space_travel(5,3,TRUE) space_travel(4,2,FALSE) space_travel(5,1,TRUE) space_travel(2,3,FALSE)
FOR i = 1 TO 4 { WHILE (CLEAR AHEAD) { EAST() } SOUTH() } WEST() FOR i = 1 TO 3 { WHILE (CLEAR AHEAD) { WEST() } NORTH() } WEST()
FOR i = 1 TO 3 { EAST(4) SOUTH(2) FOR j = 1 TO 2 { WEST(j) NORTH(j) } }
WHILE (TARGET NOT REACHED) { IF (ASTEROID AHEAD) OR (PLANET AHEAD) { IF (ASTEROID AHEAD) { NORTH() } ELSE { SOUTH(2) } } ELSE { EAST() } }
steps = 3 steps = steps * 2 EAST(steps) steps = steps / 3 NORTH(steps) steps = steps ^ 2 WEST(steps) steps = (steps * 2 ) - 3 SOUTH(steps) steps = (steps - 1) / 4 EAST(steps)
function cautious_approach(steps) { WHILE steps > 2 { EAST(steps) SOUTH(steps) steps = steps - 1 WEST(steps) NORTH(steps) steps = steps - 1 } EAST(steps) SOUTH(steps) } cautious_approach(5)
alpha = 3 beta = 2 WHILE (alpha > 0 AND beta > 0) { IF (alpha > beta) { EAST(alpha) alpha = alpha - 2 } ELSE IF {alpha < beta) { SOUTH(beta) alpha = alpha + 1 } ELSE { WEST(alpha) NORTH(alpha + beta) beta = beta - 2 } }
alpha = 20 FOR i = 1 TO 5 { alpha = alpha DIV 2 IF alpha MOD 2 == 0 { EAST(2) NORTH(2) } ELSE { WEST(1) SOUTH(1) } }
FUNCTION min(a, b) { IF (a < b) { RETURN a } ELSE { RETURN b } } a = 2 b = 3 WHILE (a > 0 AND b > 0) { IF (a==b) { NORTH(a) WEST(b) a = a - 1 } ELSE { EAST(min(a,b)) b = b - 1 } }
galaxy = "Milky Way" FOR i = 0 TO LENGTH(galaxy) - 1 { IF (galaxy[i] == " ") { NORTH() } ELSE { EAST() } }
planet = "Earth" distance = ASCII(planet[0]) - 65 EAST(distance) distance = 100 - ASCII(planet[1]) SOUTH(distance) distance = ASCII(planet[2]) - 110 WEST(distance) planet = UPPER(planet) distance = ASCII(planet[3]) - 80 NORTH(distance) distance = ASCII(planet[4]) - 70 EAST(distance)
planetA = "Mercury" planetB = "Neptune" FOR i = 0 TO LENGTH(planetA) - 1 { IF (planetA[i] < planetB[i]) { EAST() SOUTH() } ELSE IF (planetA[i] > planetB[i]) { WEST() NORTH() } ELSE { EAST() NORTH() } }
galaxy = "Milky Way" FOR i = 0 TO LENGTH(galaxy) - 1 { IF (ASCII(galaxy[i]) == 32) { NORTH() WEST() NORTH() } ELSE IF (ASCII(galaxy[i]) == 121) { SOUTH() WEST() SOUTH() } ELSE { EAST() } } SOUTH(2) EAST(5)
array = [2, 3, 1, 4, 2, 6] EAST(array[0]) NORTH(array[1]) IF (array[2] > 2) { WEST(array[3]) } ELSE { EAST(array[3]) } SOUTH(array[4]) WEST(array[5])
array = [4, 6, 2, 5] EAST(LENGTH(array)) FOR (i = 0 TO LENGTH(array) - 1) { array[i] = array [i] - 1 } EAST(array[0]) NORTH(array[1]) WEST(array[2]) SOUTH(array[3])
list1 = [7,8,9,10] list2 = [3,5,7,6] list3 = [] FOR (i = 0 TO 3) { list3.APPEND(list1[i] - list2[i]) } EAST(list3[0]) NORTH(list3[1]) WEST(list3[2]) SOUTH(list[3])
FUNCTION max(a,b) { IF (a > b) { RETURN a } ELSE { RETURN b } } list1 = [8,3,2,3] list2 = [3,4,2,1] list3 = [] FOR (i = 0 TO 3) { list3.APPEND(max(list1[i],list2[i])) } EAST(list3[0]) SOUTH(list3[1]) WEST(list3[2]) NORTH(list[3])
array2D = [[8, 0, 3, 6], [6, 5, 8, 9], [5, 4, 4, 3], [1, 2, 0, 2]] FOR i = 0 TO 3 { FOR j = 0 TO 3 { IF (array2D[i,j] MOD 2 == 0) { EAST() NORTH() } ELSE { WEST() SOUTH() } } }
steps = 1 function double() { GLOBAL steps steps = steps * 2 } EAST(steps) double() SOUTH(steps) double() EAST(steps)
steps = 2 function double() { steps = steps * 2 SOUTH(steps) } function half() { GLOBAL steps steps = steps / 2 NORTH(steps) } EAST(steps) double() EAST(steps) half() WEST(steps) NORTH(steps)
FUNCTION double(byValue steps) { steps = steps * 2 SOUTH(steps) } steps = 2 EAST(steps) double(steps) EAST(steps) NORTH(steps) EAST(steps) NORTH(steps)
FUNCTION double(byRef steps) { steps = steps * 2 SOUTH(steps) } steps = 2 EAST(steps) double(steps) EAST(steps) NORTH(steps)_
Level Complete!