// SWIFT CODE let robot = Robot.activeRobot() for i in 0..<100 { let dst1: Int = robot.scanDistance() robot.moveBy(dst1) if robot.scanColor() == Color(name:"BLUE") { break } if robot.scanColor() == Color(name:"GREEN"){ robot.turn("RIGHT") } else { robot.turn("LEFT") } } robot.turn("LEFT")