path
index
/Users/hollis/Desktop/nakedmud/lib/pymodules/path.py

path.py
 
Plugs into the routine module to allow for the easy construction of paths and
path following.

 
Modules
       
mud
mudsys
room

 
Functions
       
build_patrol(rms, reverse=True, ignore_doors=False, stay_zone=True)
builds a set of directions that need to be followed to do a patrol
between the rooms. If reverse is true, also supplies the directions
to loop back on itself
cmd_path(ch, cmd, arg)
Usage: path <room>
 
Prints out a Python list of the directions needed to move from your
current location to a specified destination.
leads_to(frm, to)
returns whether from leads directly to to
path_to_dirs(path)
takes a path of rooms and converts it to directions
shortest_path = shortest_path_bfs(frm, to, ignore_doors=False, stay_zone=True, ignore=None)
calculates the shortest path, but uses a breadth first search. More
efficient than depth-first seach for very short paths with lots of
branches or very large muds.
shortest_path_bfs(frm, to, ignore_doors=False, stay_zone=True, ignore=None)
calculates the shortest path, but uses a breadth first search. More
efficient than depth-first seach for very short paths with lots of
branches or very large muds.
shortest_path_dfs(frm, to, ignore_doors=False, stay_zone=True, ignore=None)
returns the steps needed to take to go from one room to another. More
efficient than breadth-first search for very long paths with only a few
branches, or very small muds.
step(frm, to, ignore_doors=False, stay_zone=True)
returns the first step needed to take to go from one room to another