Example #1
0
        public void Init()
        {
            string mazeFileName = "ExampleMazeSmall.txt";

            this.mazeLoader         = new MazeFileLoader(mazeFileName);
            this.mazeValidtor       = new MazeValidator();
            this.mazePositionFinder = new MazePositionFinder();
            this.mazeGridGenerator  = new MazeGridGenerator(mazeLoader, mazeValidtor, mazePositionFinder);
            this.maze             = new core.Maze(mazeGridGenerator);
            this.explorerPosition = new ExplorerPosition();
            this.movementAnalyser = new MovementAnalyser(this.explorerPosition, this.maze);
            this.moveHandler      = new MoveHandler(this.explorerPosition);
            this.explorer         = new Explorer(this.maze, this.movementAnalyser, this.moveHandler);
        }
Example #2
0
 public MovementAnalyser(IExplorerPosition explorerPosition, IMaze maze)
 {
     this.explorerPosition = explorerPosition.CheckIfNull(nameof(explorerPosition));
     this.maze             = maze.CheckIfNull(nameof(maze));
 }
Example #3
0
 public MoveHandler(IExplorerPosition explorerPosition) => this.explorerPosition = explorerPosition.CheckIfNull(nameof(explorerPosition));
Example #4
0
 public void Init() => this.explorerPosition = new ExplorerPosition();