Quote Originally Posted by me
If you want to guarantee that there are atleast 1 wall between rooms, you can just expand the bounding box to include a 1-tile thick wall all around the edges of each room. That is:

X -= 1;
Y -= 1;
W += 2;
H += 2;
Then when you carve the room, just make sure you carve the room one smaller than the bounding-box / room-coordinates say, otherwise you would just be increasing the size of the rooms rather than solving the problem.

In other words, just leave a 1-tile thick wall all around each room when you carve them.