Okay, im trying to make a maze generator for my dungeon crawler game, the players location is tracked through rooms by a 2-D array. the value of 1 is nothing, the value of 2 makes the computer "load" the room number that is stored in int room_Num, which is a placeholder for my 2-D array while the player is in that "room" (Because whatever room the player is in, sets that location to 2). The gen im going for is one that will remove blocks to reveal entrances as it clears out a maze. But the problem is is that since im constantly removing and adding objects as I move through the world, theres no real "storage" system as the player moves through the world unless I add a diffrent number to the 2-D array, (lets say 5) add an if statement that says if world == 5, room5();. room5() would then just add objects to the world in the way that I tell them too. This works fine but the problem is is because a maze gen would be using a random selection of paths to create the maze, I would also need corresponding numbers on my 2 d array that match what the maze generator has already done. But because there are about 21 (my math might be wrong) diffrent possibilities for rooms with a max of 4 exits, this quickly becomes inefficient and annoying to code. I'm wondering if there would be a way to do this by writing to a file or something that could accomplish my task of creating a maze easier than having my algroythem assining up to 21 different values to things inside of a 2-D array. Like could I have a file that holds all the rooms in a more specific manner, such as as it generates the maze, each room it goes into, it writes into the file where the room is, and how many exits are open using 4 integers. So that my program when faced with a new room, will go into the file, get the values, and load the room accordingly. This would also make it eaiser to designate treasure rooms, boss rooms, stair rooms, key rooms, and difficulty levels as they could be all stored inside of my file. :| any help or tips?

