I'm having a bit of trouble developing code to figure out which doors connect in Rogue which is written in c. Not the actual path making. I just dont understand how they link to each other.
If rooms have 2 doors each then, while not the cleanest solution, I can connect the first rooms door1 to the second rooms door2 and continue that pattern, finally going around in a loop.
However, say there are 3 doors for one room, then that would break because one door wouldnt connect to anything. The same thing goes for a one door room.
Any help would be appreciated and links to examples would help too.
Thanks
EDIT
I'm not really generating paths right now, its more of the player teleporting to another door. If it were paths then of course it could intersect which takes care of the paths.