Exemple #1
0
        public void TestInitialize()
        {
            _mapResources = Substitute.For <IMapResources>();
            var map = new Map()
            {
                Columns     = 4,
                Rows        = 8,
                MapDraw     = "",
                MappedArray = new char[8, 4] {
                    { 'X', 'X', 'X', 'X' },
                    { 'S', ' ', 'X', 'X' },
                    { 'X', ' ', 'X', 'X' },
                    { 'X', ' ', ' ', 'X' },
                    { 'X', 'X', ' ', 'X' },
                    { 'X', ' ', ' ', 'X' },
                    { 'X', ' ', 'X', 'X' },
                    { 'X', 'F', 'X', 'X' }
                }
            };


            _mapResources.GetMap().Returns(map);
            _maze = new Maze.Maze(_mapResources);
        }
Exemple #2
0
 public Maze(IMapResources mapResources)
 {
     _map = mapResources.GetMap();
 }