Ejemplo n.º 1
0
 def __init__(self, first, second = None):
     Vector2D.__init__(self, first, second)
     self.id = constants.globalId
     constants.globalId += 1
     ## Set of adjacent nodes.
     self.neighbors = set()
     ## Local terrain information.
     self.terrain = game.map.getTerrainInfoAtGridLoc(self.toGridspace())
     ## Color of the node, for debugging purposes.
     self.color = [random.randint(64, 255) for i in xrange(3)]