public bool GetPotentialConflictingDorms(int thisDorm, SortedSet <int> dormsBeingCleared, IDictionary <int, InterDormTracking> dormPriorities) { if (HasMultiDormOptions) { if (dormsBeingCleared != null && dormsBeingCleared.Count > 0) { foreach (var otherDorm in dormPriorities.Keys) { if (otherDorm != thisDorm) { var tracker = dormPriorities[otherDorm]; if (tracker.IncludeInResolving()) { if (dormsBeingCleared.Contains(otherDorm)) { DormsToClear.Add(otherDorm); tracker.Options = 0; } else { IncludedDorms.Add(otherDorm); } } } } } else { foreach (var otherDorm in dormPriorities.Keys) { if (otherDorm != thisDorm && dormPriorities[otherDorm].IncludeInResolving()) { IncludedDorms.Add(otherDorm); } } } if (IncludedDorms.Count > 0) { return(true); } else { HasMultiDormOptions = false; } } return(false); }
public void AddDormForClearing(int dorm) { DormsToClear.Add(dorm); IncludedDorms.Remove(dorm); }