Skip to content

Commit 1ce1445

Browse files
try 24
1 parent 286ab65 commit 1ce1445

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

24.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,13 @@ def one_way(im, x, y, ok_points_dic, max_key):
6060
to_be_add_dict[str(max_key)] = way_ok_points
6161
x = point[0]
6262
y = point[1]
63-
way_ok_points.append((x, y))
64-
for element in to_be_delete:
65-
del ok_points_dic[element]
63+
new_points = to_be_add_dict.get(str(max_key))
64+
new_points.append((x, y))
65+
to_be_add_dict[str(max_key)] = new_points
6666
for key in to_be_add_dict.keys():
6767
ok_points_dic[key] = to_be_add_dict[key]
68+
for element in to_be_delete:
69+
del ok_points_dic[element]
6870

6971

7072
def find_next_point(im, x, y, ok_points, way):

0 commit comments

Comments
 (0)