// Return true if any locations contain objects moving any of these ways // if found add this location to every trail (usually just the root) internal bool OpFindOM(HashSet <int> objectids, Direction direction, MatchOperator oper) { var matches = _levelstate.FindMatches(objectids, direction, oper).ToList(); if (matches.Count == 0) { _vm_trail = new Trail(); // Hmmm. Maybe clear all is better? } //_trail.Clear(); else { // combinatorially add match to all trails foreach (var trail in _vm_trail.GetLeaves()) { foreach (var match in matches) { _vm_trail.Add(trail, match); } } } return(_vm_trail.IsEmpty); }