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

All Samples(0)  |  Call(0)  |  Derive(0)  |  Import(0)

src/r/a/ransack-python-HEAD/MAP/map.py   ransack-python(Download)
    def neighbors(self, tile):
        returnList = []
        (x,y) = tile
        for (Cx, Cy) in const.CARDINALS:
            returnList.append((Cx+x, Cy+y))
        if self.getEntry(x,y) in range(18,86):
            returnList = [(x,y)]
            for (Cx, Cy) in const.CARDINALS:
                if self.getEntry(x+Cx,y+Cy) in range(18, 86):
                    count = 0
                    for (Nx, Ny) in const.CARDINALS:
            return returnList
        entryList = []
        for (Cx,Cy) in const.CARDINALS:
            if (x+Cx,y+Cy) not in self.visited and ~self.BFSQueue.has( (x+Cy, y+Cy) and self.getEntry(x+Cx,y+Cy) in range(18) ):
                self.BFSQueue.push( (x+Cx, y+Cy) )
        while not self.BFSQueue.isEmpty():
            (x, y) = self.BFSQueue.pop()
            for (Cx,Cy) in const.CARDINALS:
                if (x+Cx,y+Cy) not in self.visited and  not self.BFSQueue.has( (x+Cx, y+Cy) ) and self.getEntry(x+Cx,y+Cy) in range(24):
                    self.BFSQueue.push( (x+Cx, y+Cy) )

src/r/a/ransack-python-HEAD/level_editor.py   ransack-python(Download)
        (x,y) = pieceLocation
        entryList = []
        for (Cx,Cy) in const.CARDINALS:
            if (myMap.getEntry(x,y) == myMap.getEntry(x+Cx,y+Cy) and (x+Cx,y+Cy) not in self.visited and ~self.BFSQueue.has( (x+Cy, y+Cy) ) ):
                self.BFSQueue.push( (x+Cx, y+Cy) )