예제 #1
0
파일: Game.cs 프로젝트: KodernPl/PuzzleGame
        /// <summary>
        /// Make solution string
        /// </summary>
        /// <returns></returns>
        public string MakeSolution()
        {
            string solution;
            Puzzle newPuzzle = puzzle.Clone();

            solution = newPuzzle.SolvePuzzle();
            return(solution);
        }
예제 #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);
            }

        }