private void RemoveExercise(Servant servant) { IMovable unit = servant.mUnit; Debug.Assert(mAiServants.Contains(servant)); RemoveExercise(unit); }
public void AddExercise(IMovable unit, IExercise exercise) { Debug.Assert(mCurrentIdleUnits.Contains(unit)); Debug.Assert(mUnitToServant.ContainsKey(unit)); Debug.Assert(mUnitToServant[unit] == null); Servant servant = new Servant(unit, exercise); servant.RegisterAtExercise(); mAiServants.Add(servant); mUnitToServant[unit] = servant; mCurrentIdleUnits.Remove(unit); }