Exemplo n.º 1
0
        public static void Main()
        {
            var mazeApp = new MazeApp();

            /*
             * Part 1
             * ---------
             * maze1.txt works
             * maze2.txt gets stuck
             * A new algorithm is available in the AdvancedMazeSolver class in the ThirdPartyLogic project
             *   - we may not modify or add any code in this project as it is provided by a 3rd party
             *   - write an Adapter to use the existing MazeWalker class with the new logic
             * Notes:
             *   - Point already has an implicit conversion to ThirdPartyPoint
             *   - Conversion extension methods to/from this project's Orientation enum and ThirdPartyLogic's Direction enum already exist
             *
             * Part 2
             * ---------
             * We have two different ways of displaying the progress through a maze: BlandWalkerStateDumper and FancyWalkerStateDumper.
             * The former outputs the position of the walker at each stage, the later outputs a pictoral view of the whole maze and the walker's position within it.
             * Both implement the same interface. Both currently dump to the console.
             * Now we want both classes to be able to write both to the console and to file.
             * Apply the Bridge pattern to allow both classes to write to both console and file.
             * Notes:
             *   - Yes, there are better ways of doing this than using the Bridge pattern since both output strings, but imagine the output for one was an .png, or an audio file.
             *
             * Part 3
             * ---------
             * We have an upcoming requirment to support multiple formats for maze input. In preparation, apply the Builder pattern to the maze creation logic.
             * Rewrite the input to accept input in the form given in MazeFiles/points1.txt
             */
            mazeApp.Run(@"MazeFiles\points1.txt");
            Console.ReadLine();
        }
Exemplo n.º 2
0
        public static void Main()
        {
            var mazeApp = new MazeApp();

            /*
             * maze1.txt works
             * maze2.txt gets stuck
             * If using NUnit 3 - You will need to append TestContext.CurrentContext.TestDirectory to front of path to make it work properly
             * And do not use Path.Combine. If Path1 contains a C:\ it will always just return path2? Ask MS why.
             */
            mazeApp.Run(@"MazeFiles\maze1.txt");
            Console.ReadLine();
        }
Exemplo n.º 3
0
        public static void Main()
        {
            var mazeApp = new MazeApp();

            mazeApp.Run(@"..\..\..\..\maze1.txt");
        }