Ejemplo n.º 1
0
 public void CreateMaze()
 {
     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();
         }
     }
     map = BuildMaze1(map); //Hardcoded to build maze 1 for now
 }
Ejemplo n.º 2
0
 Tile[,] BuildMaze1(Tile[,] maze)
 {
     maze[0, 0].FourWalls = Walls.North | Walls.West;
     maze[0, 1].FourWalls = Walls.West;
     maze[0, 2].FourWalls = Walls.West | Walls.South;
     maze[1, 0].FourWalls = Walls.North;
     maze[1, 1].FourWalls = Walls.North | Walls.East | Walls.South;
     maze[1, 2].FourWalls = Walls.South;
     maze[2, 0].FourWalls = Walls.North | Walls.East;
     maze[2, 1].FourWalls = Walls.None;
     maze[2, 2].FourWalls = Walls.East | Walls.South;
     return maze;
 }