eaglelandsonce commited on
Commit
dec3ffb
·
verified ·
1 Parent(s): 30f4297

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -60,10 +60,10 @@ def draw_grid(data, highlight_coords=None):
60
  # Determine if the road is vertical or horizontal based on start and end coordinates
61
  if start[0] == end[0]: # Vertical road
62
  for y in range(min(start[1], end[1]), max(start[1], end[1]) + 1):
63
- ax.add_patch(plt.Rectangle((start[0], nrows-y-1), 1, 1, color=road_color))
64
  else: # Horizontal road
65
  for x in range(min(start[0], end[0]), max(start[0], end[0]) + 1):
66
- ax.add_patch(plt.Rectangle((x, nrows-start[1]-1), 1, 1, color=road_color))
67
 
68
  # Draw buildings
69
  for building in data['buildings']:
 
60
  # Determine if the road is vertical or horizontal based on start and end coordinates
61
  if start[0] == end[0]: # Vertical road
62
  for y in range(min(start[1], end[1]), max(start[1], end[1]) + 1):
63
+ ax.add_patch(plt.Rectangle((start[0], nrows-y-1), 1, 1, color=road['color']))
64
  else: # Horizontal road
65
  for x in range(min(start[0], end[0]), max(start[0], end[0]) + 1):
66
+ ax.add_patch(plt.Rectangle((x, nrows-start[1]-1), 1, 1, color=road['color']))
67
 
68
  # Draw buildings
69
  for building in data['buildings']: