Public Member Functions | |
| def | __init__ |
| def | fill |
| def | dist |
| def | lov |
| def | get_path |
| def | fromPos |
Public Attributes | |
| cells | |
| cellsGrid | |
Orthonormed map with associated alogrithms
| 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))
1.7.6.1