Control the line move, if the line head too close to the obstacle, it will rotate around the obstacles. the line will stop immediately Rotation, if you leave the screen, and moving towards the current direction, the line can not hit obstacles or edges, otherwise you will fail.