Пример #1
0
        /*protected void go (){
         *      double xx;
         *      bool xy= true;
         *
         *      xx = x;
         *      GoForward ();
         *      do{
         *              if((xx-x)>=5){
         *                      xy= false;
         *                              }
         *
         *      }while(xy);
         *
         *      Halt ();
         * }*/


        #region Protected Event Handlers

        /// <summary>
        /// Raises the robot update event.
        /// </summary>
        /// <param name="e">E.</param>
        protected virtual void OnRobotUpdate(RobotUpdateEventArgs e)
        {
            if (RobotUpdated != null)
            {
                RobotUpdated(this, e);
            }
        }
Пример #2
0
        /// <summary>
        /// Handles the robot update event.
        /// </summary>
        /// <param name="sender">Sender.</param>
        /// <param name="e">E.</param>
        private void Robot_Update(object sender, RobotUpdateEventArgs e)
        {
//			if (IsRealized)
//			{
//				textView.Buffer.Text += "Robot: x = " + e.Robot.X +
//				", y = " + e.Robot.Y +
//				", rotation = " + e.Robot.Rotation +
//				"\n";
//			}
        }
Пример #3
0
 /// <summary>
 /// Handles the robot update event.
 /// </summary>
 /// <param name="sender">Sender.</param>
 /// <param name="e">E.</param>
 private void Robot_Update(object sender, RobotUpdateEventArgs e)
 {
     // On the first update.
     if (lastRotation == -7.0)
     {
         lastRotation = e.Robot.Heading;
     }
     else
     {
         relativeRotation += e.Robot.Heading - lastRotation;
         lastRotation      = e.Robot.Heading;
     }
 }
Пример #4
0
 /// <summary>
 /// Raises the update robot event.
 /// </summary>
 private void RaiseRobotUpdate()
 {
     RobotUpdateEventArgs args = new RobotUpdateEventArgs (this);
     OnRobotUpdate (args);
 }
Пример #5
0
 /// <summary>
 /// Raises the robot update event.
 /// </summary>
 /// <param name="e">E.</param>
 protected virtual void OnRobotUpdate(RobotUpdateEventArgs e)
 {
     if (RobotUpdated != null)
     {
         RobotUpdated (this, e);
     }
 }
Пример #6
0
 /// <summary>
 /// Path_s the update.
 /// </summary>
 /// <param name="sender">Sender.</param>
 /// <param name="e">E.</param>
 private void Path_Update(object sender, RobotUpdateEventArgs e)
 {
     // On the first update.
 }
Пример #7
0
 /// <summary>
 /// Handles the robot update event.
 /// </summary>
 /// <param name="sender">Sender.</param>
 /// <param name="e">E.</param>
 private void Robot_Update(object sender, RobotUpdateEventArgs e)
 {
     // On the first update.
     if (lastRotation == -7.0)
     {
         lastRotation = e.Robot.Heading;
     }
     else
     {
         relativeRotation += e.Robot.Heading - lastRotation;
         lastRotation = e.Robot.Heading;
     }
 }
Пример #8
0
 /// <summary>
 /// Handles the robot update event.
 /// </summary>
 /// <param name="sender">Sender.</param>
 /// <param name="e">E.</param>
 private void Robot_Update(object sender, RobotUpdateEventArgs e)
 {
     Console.Write (e.ToString ());
     QueueDraw ();
 }
Пример #9
0
 /// <summary>
 /// Handles the robot update event.
 /// </summary>
 /// <param name="sender">Sender.</param>
 /// <param name="e">E.</param>
 private void Robot_Update(object sender, RobotUpdateEventArgs e)
 {
     Console.Write(e.ToString());
     QueueDraw();
 }
Пример #10
0
 /// <summary>
 /// Path_s the update.
 /// </summary>
 /// <param name="sender">Sender.</param>
 /// <param name="e">E.</param>
 private void Path_Update(object sender, RobotUpdateEventArgs e)
 {
     // On the first update.
 }
Пример #11
0
 /// <summary>
 /// Handles the robot update event.
 /// </summary>
 /// <param name="sender">Sender.</param>
 /// <param name="e">E.</param>
 private void Robot_Update(object sender, RobotUpdateEventArgs e)
 {
     //			if (IsRealized)
     //			{
     //				textView.Buffer.Text += "Robot: x = " + e.Robot.X +
     //				", y = " + e.Robot.Y +
     //				", rotation = " + e.Robot.Rotation +
     //				"\n";
     //			}
 }
Пример #12
0
        /// <summary>
        /// Raises the update robot event.
        /// </summary>
        private void RaiseRobotUpdate()
        {
            RobotUpdateEventArgs args = new RobotUpdateEventArgs(this);

            OnRobotUpdate(args);
        }