def createRooms( rm ):
<EOL>ret = {}<EOL>for c in rm:<EOL><INDENT>if c in string.ascii_letters:<EOL><INDENT>if c != "<STR_LIT>":<EOL><INDENT>ret[c] = Room(c)<EOL><DEDENT>else:<EOL><INDENT>ret[c] = Exit()<EOL><DEDENT><DEDENT><DEDENT>rows = rm.split("<STR_LIT:\n>")<EOL>for row,line in enumerate(rows):<EOL><INDENT>for col,c in enumerate(line):<EOL><INDENT>if c in string.ascii_letters:<EOL><INDENT>room = ret[c]<EOL>n = None<EOL>s = None<EOL>e = None<EOL>w = None<EOL>if col > <NUM_LIT:0> and line[col-<NUM_LIT:1>] in "<STR_LIT>":<EOL><INDENT>other = line[col-<NUM_LIT:2>]<EOL>w = ret[other]<EOL><DEDENT>if col < len(line)-<NUM_LIT:1> and line[col+<NUM_LIT:1>] in "<STR_LIT>":<EOL><INDENT>other = line[col+<NUM_LIT:2>]<EOL>e = ret[other]<EOL><DEDENT>if row > <NUM_LIT:1> and col < len(rows[row-<NUM_LIT:1>]) and rows[row-<NUM_LIT:1>][col] in '<STR_LIT>':<EOL><INDENT>other = rows[row-<NUM_LIT:2>][col]<EOL>n = ret[other]<EOL><DEDENT>if row < len(rows)-<NUM_LIT:1> and col < len(rows[row+<NUM_LIT:1>]) and rows[row+<NUM_LIT:1>][col] in '<STR_LIT>':<EOL><INDENT>other = rows[row+<NUM_LIT:2>][col]<EOL>s = ret[other]<EOL><DEDENT>room.doors=[n,s,e,w]<EOL><DEDENT><DEDENT><DEDENT>return ret<EOL>
create rooms, using multiline string showing map layout
string contains symbols for the following:
 A-Z, a-z indicate rooms, and rooms will be stored in a dictionary by
           reference letter
 -, | symbols indicate connection between rooms
 <, >, ^, . symbols indicate one-way connection between rooms