Exemplo n.º 1
0
        public void SolvePuzzle()
        {
            var board = BoardFactory.CreateRedDonkeyPuzzle();

            var someSuperIntelligentPerson = new SomeSuperIntelligentPerson();

            var solution = someSuperIntelligentPerson.SolvePuzzle(board);

            var solutionViewer = new SolutionViewer();

            solutionViewer.ShowSolution(board, solution);
        }
Exemplo n.º 2
0
        static void Main()
        {
            var puzzle = BoardFactory.CreateRedDonkeyPuzzle(); //8s and 114 moves

            //var puzzle = BoardFactory.CreateSimpleTrafficJamPuzzle(); //?s and 82 moves
            //var puzzle = BoardFactory.CreateCenturyBoard(); // 14s 131moves
            //var puzzle = BoardFactory.CreateSuperCenturyBoard(); //12s  179moves

            Console.BackgroundColor = ConsoleColor.Black;
            Console.Clear();
            Console.WriteLine(DateTimeOffset.UtcNow);

            var someSuperIntelligentPerson = new SomeSuperIntelligentPerson();

            var solution = someSuperIntelligentPerson.SolvePuzzle(puzzle);

            var solutionViewer = new SolutionViewer();

            solutionViewer.ShowSolution(puzzle, solution);
        }