@@ -61,14 +61,16 @@ class Map(object):
6161
6262 You can set to this attribute if you want, but you'll typically
6363 be using it to read the field-of-view of a L{compute_fov} call.
64+
65+ @since: 1.5.0
6466 """
6567
6668 class _MapAttribute (object ):
6769 def __init__ (self , map , bit_index ):
6870 self .map = map
6971 self .bit_index = bit_index
7072 self .bit = 1 << bit_index
71- self .bit_inverse = 0xFFFF ^ self .bit
73+ self .bit_inverse = 0xFF ^ self .bit
7274
7375 def __getitem__ (self , key ):
7476 return bool (self .map ._array_cdata [key [1 ]][key [0 ]] & self .bit )
@@ -160,13 +162,18 @@ def iterate_fov():
160162
161163 def compute_path (self , start_x , start_y , dest_x , dest_y ,
162164 diagonal_cost = _math .sqrt (2 )):
163- """
165+ """Get the shortest path between two points.
166+
167+ The start position is not included in the list.
164168
165169 @type diagnalCost: float
166170 @param diagnalCost: Multiplier for diagonal movement.
167171
168172 Can be set to zero to disable diagonal movement
169173 entirely.
174+ @rtype: [(x, y), ...]
175+ @return: Returns a the shortest list of points to get to the destination
176+ position from the starting position
170177 """
171178 # refresh cdata
172179 _lib .TDL_map_data_from_buffer (self ._map_cdata ,
0 commit comments