18 using System.Collections.Generic;
32 public int Count => _resolvers.Count;
34 private readonly List<IPositionGroupResolver> _resolvers;
51 _resolvers = resolvers.ToList();
60 _resolvers.Add(resolver);
73 _resolvers.Insert(index, resolver);
83 return _resolvers.Remove(resolver);
96 foreach (var resolver
in _resolvers)
98 var resolved = resolver.Resolve(positions);
102 if (positions.Count > 0)
104 throw new InvalidOperationException(
"All positions must be resolved into groups.");
121 foreach (var resolver
in _resolvers)
123 if (resolver.TryGroup(newPositions, currentPositions, out group))
147 var seen =
new HashSet<PositionGroupKey>();
148 foreach (var resolver
in _resolvers)
150 foreach (var group
in resolver.GetImpactedGroups(groups, positions))
152 if (seen.Add(group.Key))