This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import heapq | |
maxDistance = 2000 | |
def computeDistanceMap(costMap, starts): | |
sizeY = len(costMap) | |
sizeX = len(costMap[0]) | |
distMap = [[maxDistance for x in range(sizeX)] for y in range(sizeY)] | |
# Starting positions have a distance of zero and are scheduled |