Created functions for checking if the direction is a permitted direction for creating exits and corridors away from rooms.
Tested it as well, so should be working fine at this point.