Ejemplo n.º 1
0
 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));
         }
     }
 }
Ejemplo n.º 2
0
        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);
        }