예제 #1
0
 /// <summary>
 /// Raises the <see cref="Moved"/> event.
 /// </summary>
 /// <param name="e">The event args to pass to the event handler.</param>
 protected virtual void OnMoved(RobotMovedEventArgs e)
 {
     Moved?.Invoke(this, e);
 }
예제 #2
0
 /// <summary>
 /// Executed when the robot has been issued a move command.
 /// </summary>
 /// <param name="sender">The sending robot.</param>
 /// <param name="e">The event args of the robot move.</param>
 void OnRobotMoved(object sender, RobotMovedEventArgs e)
 {
     lock (moves)
     {
         moves.Enqueue(e.MovementDirection);
     }
 }