Ejemplo n.º 1
0
 public Explorer(IMaze maze, IMazeConsole console)
 {
     _maze           = maze;
     _console        = console;
     CurrentPosition = _maze.GetStartingPositionOfExplorer(Symbol.Start);
     CurrentPosition.PositionHistory = new List <Position>();
 }
Ejemplo n.º 2
0
        public void TestInitialize()
        {
            _maze    = Substitute.For <IMaze>();
            _console = Substitute.For <IMazeConsole>();

            position = new Position()
            {
                PositionX = 1, PositionY = 0
            };

            _maze.GetStartingPositionOfExplorer(Symbol.Start).Returns(position);
            _maze.CheckRange(0, 0).ReturnsForAnyArgs(true);
            _maze.IsExit(2, 1).ReturnsForAnyArgs(true);
            _maze.IsAWall(0, 0).ReturnsForAnyArgs(false);
            _explorer = new Explorer(_maze, _console);
        }