Have you tried using a grid system with a list? Or assigning some kind of coordinates to the rooms? I think it could simplify the issue a lot.