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

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

            Direction = Directions.Forward;
            Start();
        }
Beispiel #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();
        }
Beispiel #3
0
        /// <summary>
        /// Put the buggy in reverse.
        /// </summary>
        public void Reverse()
        {
            Stop();

            FrontLeftWheel.Reverse();
            FrontRightWheel.Reverse();
            RearLeftWheel.Reverse();
            RearRightWheel.Reverse();
            Direction = Directions.Reverse;

            Start();
        }
Beispiel #4
0
        /// <summary>
        /// Rotate the buggy left (on the spot).
        /// </summary>
        public void RotateLeft()
        {
            Stop();

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

            FrontRightWheel.Forward();
            RearRightWheel.Forward();
            Direction = Directions.RotatingLeft;

            Start();
        }
Beispiel #5
0
        /// <summary>
        /// Move the buggy right.
        /// </summary>
        public void ShuffleRight()
        {
            Stop();

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

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

            Start();
        }