Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(14)  |  Call(8)  |  Derive(0)  |  Import(6)

src/s/h/shedskin-HEAD/examples/astar_main.py   shedskin(Download)
    def findPath_ss(self):
        astar = AStar_ss.AStar(AStar_ss.SQ_MapHandler(self.mapdata,self.mapw,self.maph))
        start = AStar_ss.SQ_Location(self.startpoint[0],self.startpoint[1])
        end = AStar_ss.SQ_Location(self.endpoint[0],self.endpoint[1])
 

src/p/y/pyvida-HEAD/tests.py   pyvida(Download)
import Image, ImageDraw
 
from astar import AStar
 
from __init__ import Game, Actor, Scene, Item, MenuItem, Rect, Action, WalkArea
        solids = []
        walkarea = []
        p = AStar((sx, sy), (tx, ty), nodes, solids, walkarea)
        self.assertEqual(p, [(sx,sy), (tx,ty)])
 
        solids = []
        walkarea = []
        p = AStar((sx, sy), (tx, ty), nodes, solids, walkarea)
        self.assertEqual(p, [(sx,sy), (tx,ty)])
 
        walkarea = []
        nodes.extend(solids_to_nodes(solids))
        p = AStar((sx, sy), (tx, ty), nodes, solids, walkarea)
        self.assertEqual(p, [(100, 100), (148, 88), (175, 88), (200, 100)])