public void RightHandedEaterGetsFood(Philosopher eater, TakeBitEventArgs e) { eater.RightChopstick.WaitOne(); eater.LeftChopstick.WaitOne(); Eat(eater); eater.RightChopstick.Set(); eater.LeftChopstick.Set(); }
protected virtual void OnTakeBiteEvent(Philosopher eater, TakeBitEventArgs e) { TakeBiteEvent?.Invoke(eater, e); }
public void Eat(TakeBitEventArgs e) { IsEating = true; EatFromTable?.Invoke(this, e); }