Skip to content

Commit 3df767e

Browse files
24 one next point
1 parent 4d8b76f commit 3df767e

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

24.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ def third_step(im, start, width, height):
2929
x = start[0]
3030
y = start[1]
3131
ok_points = [(x, y)]
32-
one_way(im, start, x, y, 0, ok_points)
32+
one_way(im, start, x, y, ok_points)
3333

3434

35-
def one_way(im, start, x, y, key, ok_points):
35+
def one_way(im, start, x, y, ok_points):
3636
while True:
37-
print("key={}, ok_points={}".format(key, ok_points))
37+
print("ok_points={}".format(ok_points))
3838
next_points = find_next_point(im, x, y, ok_points)
39-
print("key={}, point=({}, {}),next_point={}".format(key, x, y, next_points))
39+
print("point=({}, {}),next_point={}".format(x, y, next_points))
4040
if next_points is None:
4141
print("break code 1")
4242
break
@@ -46,11 +46,9 @@ def one_way(im, start, x, y, key, ok_points):
4646
y = next_points[0][1]
4747
ok_points.append((x, y))
4848
else:
49-
for point in next_points:
50-
key += 1
51-
x = point[0]
52-
y = point[1]
53-
one_way(im, start, x, y, key, ok_points)
49+
print("len(next_points)={}".format(len(next_points)))
50+
print("break code 2")
51+
break
5452

5553

5654
def find_next_point(im, x, y, ok_points):

0 commit comments

Comments
 (0)