level 6
【富饶之地】
func backAround() {
turnLeft()
turnLeft()
moveForward()
moveForward()
turnRight()
}
while !isBlocked {
moveForward()
turnRight()
for i in 1 ... 3 {
if isOnClosedSwitch {
toggleSwitch()
moveForward()
} else if isOnOpenSwitch {
moveForward()
} else if isOnGem {
collectGem()
moveForward()
}
}
backAround()
}
2017年03月30日 12点03分