private void GenMaze() { if (maze.IsGenerated()) { UnDrawMaze(); maze.DeleteMaze(); } maze.SetRoomCreating(CreateRooms); maze.SetRoomParams(RoomCount, RoomWidth, RoomHeight); maze.SetMazeDepth(1); maze.SetUseSeed(UseSeed); maze.SetSeedForRandom(MazeSeed); maze.SetStartPosition(startPos); maze.GenerateNewMaze(MazeWidth, MazeHeight); DrawMaze(); }