/**
         * Make some progress in the WaveFunctionCollapseAlgorithm
         */
        public Resolution Step()
        {
            // This will be true if the user has called Ban, etc, since the last step.
            if (deferredConstraintsStep)
            {
                StepConstraints();
            }

            // If we're already in a final state. skip making an observiation.
            if (status == Resolution.Undecided)
            {
                // Pick a index to use
                var index = indexPicker.GetRandomIndex(randomDouble);

                if (index != -1)
                {
                    // Pick a tile to select at that index
                    var pattern = patternPicker.GetRandomPossiblePatternAt(index, randomDouble);

                    RecordBacktrack(index, pattern);

                    // Use the pick
                    if (InternalSelect(index, pattern))
                    {
                        status = Resolution.Contradiction;
                    }
                }

                // Re-evaluate status
                if (status == Resolution.Undecided)
                {
                    patternModelConstraint.Propagate();
                }
                if (status == Resolution.Undecided)
                {
                    StepConstraints();
                }

                // If we've made all possible choices, and found no contradictions,
                // then we've succeeded.
                if (index == -1 && status == Resolution.Undecided)
                {
                    status = Resolution.Decided;
                    return(status);
                }
            }

            TryBacktrackUntilNoContradiction();

            return(status);
        }