I reached the next level with blocks, but "or" seems to not work. I now get "Unsupported binary operator OR at line 27".
Looking at Windows in your game made me think if I should make UI sections in my game re-arrangeable, but looks like something not worth the effort. What's the purpose for that "Other script Window"? It seems to not do anything, but occupy screen space.
def func():
gx = -100
gy = -100
found = False
d = 20
for xx in range(5, d):
say(xx)
for yy in range(-d, d):
if is_goal(get_pos_x()+xx, get_pos_y()+yy):
gx = get_pos_x() + xx
gy = get_pos_y() + yy
found = True
break
if found:
break
print(gx, gy)
dx = 1
if gx < get_pos_x():
dx = -1
dy = 1
if gy < get_pos_y():
dy = -1
while get_pos_x() != gx or get_pos_y() != gy:
if is_block(get_pos_x() + dx, get_pos_y()):
while get_pos_x() != gx:
print(get_pos_x(), gx)
move(dx, 0)
else:
while get_pos_y() != gy:
move(0, dy)
submit()
func()