mkRPG
 All Classes Namespaces Functions
Public Member Functions | Public Attributes
shared.world.Map Class Reference
Inheritance diagram for shared.world.Map:
shared.world.Object

List of all members.

Public Member Functions

def __init__
def fill
def dist
def lov
def get_path
def fromPos

Public Attributes

 cells
 cellsGrid

Detailed Description

Orthonormed map with associated alogrithms 

Member Function Documentation

def shared.world.Map.dist (   self,
  source,
  dest 
)
Manhattan distance 
def shared.world.Map.fill (   self)
Fill the cellsGrid attribute with cells and default cell
To be called after the Xml reading only 
def shared.world.Map.fromPos (   self,
  pos,
  maxi = None 
)
Yield cells further and further from pos, stopping at maxi
Assuming x goes right and y down it turns as the trigo circle,
it is therefore not a "serpentin" (sadly ?) 
def shared.world.Map.get_path (   self,
  source,
  dest 
)
A* algorithm on current map from source to dest 
def shared.world.Map.lov (   self,
  source,
  dest 
)
Computes if the view is degaged between source and dest
those laters must have x and y parameters and the map
cells a parameter "visible"
About O(dist(source, dest))

The documentation for this class was generated from the following file:
 All Classes Namespaces Functions