16
#第 16 题
Flyer[0].step(3)
Dev.turnRight()
Dev.step(5)
Dev.wait(9)
Dev.turnLeft()
Dev.step(8)
Dev.turnLeft()
Dev.step(2)
20
# 第 20 题
Dev.turnRight()
for i in range(6):
Spaceship.step()
if not Item[1+2*i].broken():
Dev.step(2)
Dev.step(-2)
if not Item[2*i].broken():
Dev.step(-(Spaceship.y - Item[2*i].y))
Dev.step(Spaceship.y - Item[2*i].y)
Spaceship.step()
21
# 第 21 题
for i in range(6):
if i == 2 or i == 3 or i == 4:
Dev.step()
Dev.step(-1)
Spaceship.step()
if i == 0 or i == 1 or i == 5:
Dev.step(-4)
Dev.step(4)
Spaceship.step()
26
# 第 26 题
for i in range(3):
Spaceship.turnRight()
for j in range(3):
Spaceship.step(2)
Dev.step(1+i+j)
Dev.step(-(1+j + i))
Spaceship.step(1+i)
Dev.turnRight()
29
def g(a,n,m):
Spaceship.step(a)
Dev.step(n)
Dev.turnLeft()
Dev.step(m)
Dev.turnRight()
Spaceship.step(m)
Dev.step(-n)
Spaceship.step(4)
Spaceship.turnRight()
Spaceship.step(2)
Dev.step(-4)
g(2,4,1)
Spaceship.step(7)
Spaceship.turnRight()
Dev.turnRight()
g(1,4,2)
g(2,5,1)
Spaceship.step(5)
Spaceship.turnRight()
Dev.turnRight()
g(4,3,3)
30
def g(n):
if n >= 1:
Dev.step(n)
g(n/2)
Dev.step(-n)
Dev.turnRight()
Dev.step(-n)
Dev.turnLeft()
g(n/2)
Dev.turnRight()
Dev.step(n)
Dev.turnLeft()
g(8)