コード例 #1
0
        public bool PuzzleIsValid()
        {
            var action          = new ActOnAllSegments(_puzzle);
            var validateSection = new ValidateSection();

            return(action.Execute(validateSection));
        }
コード例 #2
0
        private void ReduceCandidates()
        {
            var action           = new ActOnAllSegments(_puzzle);
            var reduceCandidates = new ReduceCandidates();

            while (!action.Execute(reduceCandidates))
            {
                ;
            }
        }
コード例 #3
0
        private void Solve_WithGivenPuzzle_SolvesPuzzle(Puzzle puzzle)
        {
            var solver      = new PuzzleSolver(puzzle);
            var acts        = new ActOnAllSegments(puzzle);
            var printPuzzle = new PrintPuzzle(puzzle);

            solver.Solve();
            printPuzzle.Print();

            Assert.IsTrue(acts.Execute(new ValidateSection()));
        }