It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
Hello everyone!

Please can anyone explain, why this solution is failing?
The result looks correct to me...

Thanks in advance, g.

-- 7 Billion Humans (2144) --
-- 61: Kurzer Dienstweg --

a:
step nw,w,sw,ne,e,se
mem1 = nearest datacube
step mem1
if c == datacube and
c != 1:
pickup c
mem1 = set 99
mem2 = foreachdir nw,w,sw,n,s,ne,e,se:
if mem2 < mem1:
mem1 = set mem2
endif
endfor
if mem1 != 99:
mem1 = calc mem1 + 1
write mem1
endif
drop
endif
jump a
avatar
gewe: Hello everyone!

Please can anyone explain, why this solution is failing?
The result looks correct to me...

Thanks in advance, g.

-- 7 Billion Humans (2144) --
-- 61: Kurzer Dienstweg --

a:
step nw,w,sw,ne,e,se
mem1 = nearest datacube
step mem1
if c == datacube and
c != 1:
pickup c
mem1 = set 99
mem2 = foreachdir nw,w,sw,n,s,ne,e,se:
if mem2 < mem1:
mem1 = set mem2
endif
endfor
if mem1 != 99:
mem1 = calc mem1 + 1
write mem1
endif
drop
endif
jump a
Check this guide :https://steamcommunity.com/sharedfiles/filedetails/?id=1492607776

Or in here : https://gamefaqs.gamespot.com/pc/231398-7-billion-humans/faqs/76600/year-61-lazy-pathways
Post edited October 18, 2020 by i_hope_you_rot
avatar
gewe: Hello everyone!

Please can anyone explain, why this solution is failing?
The result looks correct to me...
The column on the very right gets wrong before the solution finishes. You can see it starts filling up with 1s.

The reason is the empty cells where people start. They evaluate to 0.
In the line where you do if mem2 < mem1, you also have to check that mem2 is a datacube.

There are a couple of other optimisations you can do by the way.