@Cheese Cake:
A line is 1 dimensional. A square is 2 dimensional. A cube is 3 dimensional. A tesseract is 4 dimensional.
1D line has 2 points.
2D square has four lines.
3D cube has six squares.
4D tesseract (hypercube) has eight cubes.
The fourth dimension could be time or simply another "side" to reality. Think of a 2D person on a page. They would not be able to envision a 3D cube. Similarly, we as 3D beings cannot envision a 4D object. The tesseract would, from the perspective of someone inside, be infinitely large. The rooms would seem to connect to each other from every side.
Room 1 would connect to all of the other rooms. Likewise, room 2 would connect to all the other rooms. This would, of course, mean that you could enter the tesseract, but you could never leave as the doors from each room would only connect to another room. Does that help?
@Rolfy
I considered using teleporters, but the teleporters in cannot be in the same location as the teleporters out. This means you would not appear in the same location relative to the room center as you left. The whole point is to make it appear as though you have merely walked through a door. The player would feel as though they are inside an infinitely large cube. Google tesseract to see what I mean.
You know your code sucks when it does what you want before you know what you want.