level 1
var gemCounter = 0
while gemCounter < 4 {
moveForward()
if isBlocked && isOnGem {
bluePortal.isActive = false
collectGem()
gemCounter += 1
turnLeft()
turnLeft()
}else if isOnGem && !isBlocked {
bluePortal.isActive = true
collectGem()
gemCounter += 1
turnRight()
turnRight()
}else if isBlocked {
turnRight()
turnRight()
pinkPortal.isActive = false
}
}
2021年04月11日 18点04分
