<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: path</title>
</head><body bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>path</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/mud/nakedmud-mod/lib/pymodules/path.py">/mud/nakedmud-mod/lib/pymodules/path.py</a></font></td></tr></table>
<p><tt>path.py<br>
<br>
Plugs into the routine module to allow for the easy construction of paths and<br>
path following.</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom> <br>
<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="mud.html">mud</a><br>
</td><td width="25%" valign=top><a href="mudsys.html">mudsys</a><br>
</td><td width="25%" valign=top><a href="room.html">room</a><br>
</td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
<td width="100%"><dl><dt><a name="-build_patrol"><strong>build_patrol</strong></a>(rms, reverse<font color="#909090">=True</font>, ignore_doors<font color="#909090">=False</font>, stay_zone<font color="#909090">=True</font>)</dt><dd><tt>builds a set of directions that need to be followed to do a patrol<br>
between the rooms. If reverse is true, also supplies the directions<br>
to loop back on itself</tt></dd></dl>
<dl><dt><a name="-cmd_path"><strong>cmd_path</strong></a>(ch, cmd, arg)</dt><dd><tt>Usage: path <room><br>
<br>
Prints out a Python list of the directions needed to move from your<br>
current location to a specified destination.</tt></dd></dl>
<dl><dt><a name="-leads_to"><strong>leads_to</strong></a>(frm, to)</dt><dd><tt>returns whether from leads directly to to</tt></dd></dl>
<dl><dt><a name="-path_to_dirs"><strong>path_to_dirs</strong></a>(path)</dt><dd><tt>takes a path of rooms and converts it to directions</tt></dd></dl>
<dl><dt><a name="-shortest_path"><strong>shortest_path</strong></a> = shortest_path_bfs(frm, to, ignore_doors<font color="#909090">=False</font>, stay_zone<font color="#909090">=True</font>, ignore<font color="#909090">=None</font>)</dt><dd><tt>calculates the shortest path, but uses a breadth first search. More<br>
efficient than depth-first seach for very short paths with lots of<br>
branches or very large muds.</tt></dd></dl>
<dl><dt><a name="-shortest_path_bfs"><strong>shortest_path_bfs</strong></a>(frm, to, ignore_doors<font color="#909090">=False</font>, stay_zone<font color="#909090">=True</font>, ignore<font color="#909090">=None</font>)</dt><dd><tt>calculates the shortest path, but uses a breadth first search. More<br>
efficient than depth-first seach for very short paths with lots of<br>
branches or very large muds.</tt></dd></dl>
<dl><dt><a name="-shortest_path_dfs"><strong>shortest_path_dfs</strong></a>(frm, to, ignore_doors<font color="#909090">=False</font>, stay_zone<font color="#909090">=True</font>, ignore<font color="#909090">=None</font>)</dt><dd><tt>returns the steps needed to take to go from one room to another. More<br>
efficient than breadth-first search for very long paths with only a few<br>
branches, or very small muds.</tt></dd></dl>
<dl><dt><a name="-step"><strong>step</strong></a>(frm, to, ignore_doors<font color="#909090">=False</font>, stay_zone<font color="#909090">=True</font>)</dt><dd><tt>returns the first step needed to take to go from one room to another</tt></dd></dl>
</td></tr></table>
</body></html>