/*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); } }
/// <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"; // } }
/// <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; } }
/// <summary> /// Raises the update robot event. /// </summary> private void RaiseRobotUpdate() { RobotUpdateEventArgs args = new RobotUpdateEventArgs (this); OnRobotUpdate (args); }
/// <summary> /// Raises the robot update event. /// </summary> /// <param name="e">E.</param> protected virtual void OnRobotUpdate(RobotUpdateEventArgs e) { if (RobotUpdated != null) { RobotUpdated (this, e); } }
/// <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) { Console.Write (e.ToString ()); QueueDraw (); }
/// <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(); }
/// <summary> /// Raises the update robot event. /// </summary> private void RaiseRobotUpdate() { RobotUpdateEventArgs args = new RobotUpdateEventArgs(this); OnRobotUpdate(args); }