public void Hint() { if (EquilibriumFinder.Search(currentSpace, out List <SwapPair> steps)) { if (steps.Count > 0) { StartCoroutine(Highlight(steps[0].first)); StartCoroutine(Highlight(steps[0].second)); } } }
public override Matchspace Generate() { int count = 0; Matchspace space = Matchspace.Create(spaceSize); do { count++; Randomize(space); space.Step(); } while (!EquilibriumFinder.Search(space)); Debug.Log("Iterations until solution found: " + count); return(space); }