Ejemplo n.º 1
0
        /// <summary>
        /// Make solution string
        /// </summary>
        /// <returns></returns>
        public string MakeSolution()
        {
            string solution;
            Puzzle newPuzzle = puzzle.Clone();

            solution = newPuzzle.SolvePuzzle();
            return(solution);
        }
Ejemplo n.º 2
0
        public void SolvePuzzleTest2()
        {
            for (int idx = 0; idx < 10; idx++)
            {
                Puzzle puzzle = new Puzzle(5, 5);
                bool result = puzzle.CheckSolved(0, 0);
                Assert.AreEqual(false, result, "Should be not solved Test: " + idx);
                puzzle.SolvePuzzle();
                result = puzzle.CheckSolved(0, 0);
                Assert.AreEqual(true, result, "Should be solved Test: " + idx);
            }

        }