Skip to content
Snippets Groups Projects
Commit 28ddb598 authored by u214892's avatar u214892
Browse files

Merge branch 'master' of gitlab.aicrowd.com:flatland/flatland into...

Merge branch 'master' of gitlab.aicrowd.com:flatland/flatland into 66-shortest-path-predictor-cleanup-tests
parents 15884968 08d29c87
No related branches found
No related tags found
No related merge requests found
File added
...@@ -83,15 +83,12 @@ class PILGL(GraphicsLayer): ...@@ -83,15 +83,12 @@ class PILGL(GraphicsLayer):
self.background_grid = np.zeros(shape=(self.width, self.height)) self.background_grid = np.zeros(shape=(self.width, self.height))
for x in range(self.width): for x in range(self.width):
for y in range(self.height): for y in range(self.height):
distance = None distance = int(np.ceil(np.sqrt(self.width ** 2.0 + self.height ** 2.0)))
for rc in dTargets: for rc in dTargets:
r = rc[1] r = rc[1]
c = rc[0] c = rc[0]
d = int(np.floor(np.sqrt((x - r) ** 2 + (y - c) ** 2))) d = int(np.floor(np.sqrt((x - r) ** 2 + (y - c) ** 2)))
if distance is None: distance = min(d, distance)
distance = d
else:
distance = min(d, distance)
self.background_grid[x][y] = distance self.background_grid[x][y] = distance
def rgb_s2i(self, sRGB): def rgb_s2i(self, sRGB):
......
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment