Beispiel #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);
            }
        }
Beispiel #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";
//			}
        }
Beispiel #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;
     }
 }
Beispiel #4
0
 /// <summary>
 /// Raises the update robot event.
 /// </summary>
 private void RaiseRobotUpdate()
 {
     RobotUpdateEventArgs args = new RobotUpdateEventArgs (this);
     OnRobotUpdate (args);
 }
Beispiel #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);
     }
 }
Beispiel #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.
 }
 /// <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;
     }
 }
Beispiel #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 ();
 }
Beispiel #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();
 }
Beispiel #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.
 }
 /// <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";
     //			}
 }
Beispiel #12
0
        /// <summary>
        /// Raises the update robot event.
        /// </summary>
        private void RaiseRobotUpdate()
        {
            RobotUpdateEventArgs args = new RobotUpdateEventArgs(this);

            OnRobotUpdate(args);
        }