public void CreateMap1() { map = new Tile[3, 3]; // Maze 1 is 3X3 for (int x = 0; x < 3; x++) { for (int y = 0; y < 3; y++) { map[x, y] = new Tile(x, y); } } map = BuildMaze1(map); //Hardcoded to build maze 1 for now }
Tile[,] BuildMaze1(Tile[,] map) { map[0, 0].FourWalls = Walls.North | Walls.West; map[1, 0].FourWalls = Walls.North | Walls.South; map[2, 0].FourWalls = Walls.North | Walls.East; map[0, 1].FourWalls = Walls.West; map[1, 1].FourWalls = Walls.North | Walls.South | Walls.East; map[2, 1].FourWalls = Walls.West | Walls.End; map[0, 2].FourWalls = Walls.South | Walls.West; map[1, 2].FourWalls = Walls.North | Walls.South; map[2, 2].FourWalls = Walls.South | Walls.East; return map; }