예제 #1
0
        public override void ActionMove()
        {
            MyRobot.IsAdjustGunForRobotTurn   = true;
            MyRobot.IsAdjustRadarForGunTurn   = true;
            MyRobot.IsAdjustRadarForRobotTurn = true;

            if (EvitarParedes())
            {
                return;
            }

            if (Math.Abs(currentHeading - MyRobot.Heading) < 10 && Math.Abs(currentHeading - MyRobot.Heading) > 1)
            {
                dir            = -dir;
                currentHeading = MyRobot.Heading;
                MyRobot.TurnRight(ang * dir);
            }
            MyRobot.SetTurnRight(ang * dir);
            MyRobot.SetAhead(desplazar);


            MyRobot.Execute();
        }