public Explorer( IMaze maze, IMovementAnalyser movementAnalyser, IMoveHandler moveHandler) { this.maze = maze.CheckIfNull(nameof(maze)); this.movementAnalyser = movementAnalyser.CheckIfNull(nameof(movementAnalyser)); this.moveHandler = moveHandler.CheckIfNull(nameof(moveHandler)); this.Facing = Facing.East; this.recordedMoves = new List <string>(); }
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 void Init() { this.explorerPositionMock = new Mock <IExplorerPosition>(); this.mazeMock = new Mock <IMaze>(); this.movementAnalyser = new MovementAnalyser(this.explorerPositionMock.Object, this.mazeMock.Object); }