コード例 #1
0
 public void Add(SudokuSolveStep step)
 {
     lock (stepsLock)
     {
         this.steps.Add(step);
     }
 }
コード例 #2
0
 public SudokuNewStepEventArgs(SudokuSolveStep step)
 {
     if (step == null)
     {
         throw new ArgumentNullException("step");
     }
     this.step = step;
 }
コード例 #3
0
        private bool TryGetCurrentStep(out SudokuSolveStep currentStep)
        {
            currentStep = null;

            var steps = this.steps;

            if (steps.Count == 0)
            {
                return(false);                //no step
            }
            var currentStepIndex = this.currentStepIndex;

            if (currentStepIndex < 0 || currentStepIndex >= steps.Count)
            {
                return(false);
            }

            currentStep = steps[currentStepIndex];
            return(true);
        }