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); }
public MovementAnalyser(IExplorerPosition explorerPosition, IMaze maze) { this.explorerPosition = explorerPosition.CheckIfNull(nameof(explorerPosition)); this.maze = maze.CheckIfNull(nameof(maze)); }
public MoveHandler(IExplorerPosition explorerPosition) => this.explorerPosition = explorerPosition.CheckIfNull(nameof(explorerPosition));
public void Init() => this.explorerPosition = new ExplorerPosition();