Exemple #1
0
        /// <summary>
        /// Move the buggy forward.
        /// </summary>
        public void Forward()
        {
            Stop();

            FrontLeftWheel.Forward();
            FrontRightWheel.Forward();
            RearLeftWheel.Forward();
            RearRightWheel.Forward();

            Direction = Directions.Forward;
            Start();
        }
Exemple #2
0
        /// <summary>
        /// Move the buggy forward and turn to the right.
        /// </summary>
        public void TurnRight()
        {
            Stop();

            FrontLeftWheel.Forward();
            FrontRightWheel.Stop();
            RearLeftWheel.Forward();
            RearRightWheel.Stop();
            Direction = Directions.TurningRight;

            Start();
        }
Exemple #3
0
        /// <summary>
        /// Rotate the buggy right (on the spot).
        /// </summary>
        public void RotateRight()
        {
            Stop();

            FrontLeftWheel.Forward();
            RearLeftWheel.Forward();

            FrontRightWheel.Reverse();
            RearRightWheel.Reverse();
            Direction = Directions.RotatingRight;

            Start();
        }
Exemple #4
0
        /// <summary>
        /// Move the buggy left.
        /// </summary>
        public void ShuffleLeft()
        {
            Stop();

            FrontLeftWheel.Reverse();
            RearLeftWheel.Forward();

            FrontRightWheel.Forward();
            RearRightWheel.Reverse();
            Direction = Directions.ShufflingLeft;

            Start();
        }