private void OnInitExecutingOrder(Event e) { this.CurrentOrder = (e as Navigator.DrinkOrderProducedEvent)?.DrinkOrder; if (this.CurrentOrder != null) { this.WriteLine("<Robot> Received new Drink Order. Executing ..."); this.ExecuteOrder(); } }
private void FinishOrder() { this.WriteLine("<Robot> Finished serving the order. Retreating."); this.WriteLine("=================================================="); this.WriteLine(string.Empty); this.MoveTo(StartingLocation); this.CurrentOrder = null; this.Monitor <LivenessMonitor>(new LivenessMonitor.IdleEvent()); if (this.RunForever) { this.RaiseGotoStateEvent <Active>(); } else { this.RaiseGotoStateEvent <FinishState>(); } }
public DrinkOrderProducedEvent(DrinkOrder drinkOrder) { this.DrinkOrder = drinkOrder; }