Exemplo n.º 1
0
 /// <summary>
 /// Clears the solution of the maze
 /// </summary>
 public void clearSolution()
 {
     if (isSolutionExists())
     {
         mSolutionCoordinates = new List <string[]>();
         for (int level = 0; level < mMaze.MyHeight; level++)
         {
             mMazeCells[level] = new Cell[mMaze.MyColumns, mMaze.MyRows];
             for (int column = 0; column < mMaze.MyColumns; column++)
             {
                 for (int row = 0; row < mMaze.MyRows; row++)
                 {
                     mMazeCells[level][column, row] = mMaze.getMazeByFloor(level).getCell(column, row);
                 }
             }
         }
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// WinMaze Constructor
 /// </summary>
 /// <param name="maze">3d maze</param>
 /// <param name="name">Name of the maze</param>
 /// <param name="cellSize">Size of the cells</param>
 public WinMaze(Maze3d maze, string name, int cellSize)
 {
     mName                = name;
     mMaze                = maze;
     mCellSize            = cellSize;
     mSolutionCoordinates = new List <string[]>();
     for (int level = 0; level < maze.MyHeight; level++)
     {
         mMazeCells[level] = new Cell[maze.MyColumns, maze.MyRows];
         for (int row = 0; row < maze.MyRows; row++)
         {
             for (int column = 0; column < maze.MyColumns; column++)
             {
                 mMazeCells[level][column, row] = maze.getMazeByFloor(level).getCell(column, row);
             }
         }
     }
     PosZ = mMaze.MyHeight - 1;
 }