Fix: order in sunflower

This commit is contained in:
2025-11-10 03:58:52 +08:00
parent 47d25d1831
commit fe142bae33
2 changed files with 3 additions and 4 deletions

View File

@@ -24,7 +24,7 @@ def grow(xl, yl, n):
while len(check): while len(check):
nxt = list() nxt = list()
for x, y in check: for x, y in check[::-1]:
utils.mv(x, y) utils.mv(x, y)
if not can_harvest(): if not can_harvest():
nxt.append((x, y)) nxt.append((x, y))

View File

@@ -63,10 +63,9 @@ def grow(xl, xr, yl, yr):
l, r, d = yr-1, yl-1, -1 l, r, d = yr-1, yl-1, -1
for y in range(l, r, d): for y in range(l, r, d):
utils.mv(x, y) utils.mv(x, y)
cur = measure()-7 pos[measure()-7].append((x, y))
pos[cur].append((x, y))
for p in pos: for p in pos[::-1]:
for x, y in p: for x, y in p:
utils.mv(x, y) utils.mv(x, y)
while not utils.harv(): while not utils.harv():