コード例 #1
0
ファイル: HexMap.py プロジェクト: Stewie23/HexEngine
 def nextHexes(next1,next2,cur,cur2):
     h = HexMath.getNeighbours(cur.x,cur.y,self.x,self.y)
     for pos in h:
         #check if hex is intersected by line,still some bugs
         tile = self.getTile(pos)
         n = HexMath.hexintersectsline(tile,startTile,goalTile)
         if n == 1 and tile != last1 and tile != last2 and tile != cur and tile!= cur2 and tile != next1 and tile!=next2:
             if next1 == None:
                 next1 = tile
             elif next2 == None:
                 next2 = tile
     return(next1,next2)