-
Notifications
You must be signed in to change notification settings - Fork 0
/
Year 56 - Local Maximums
94 lines (93 loc) · 1.12 KB
/
Year 56 - Local Maximums
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
-- 7 Billion Humans (2199) --
-- 56: Local Maximums by @commonnickname --
step w
step w
jump a
mem2 = foreachdir n:
mem1 = foreachdir ne:
a:
if mem1 > mem2:
mem2 = set mem1
mem3 = set 1
endif
jump b
endfor
endfor
mem1 = foreachdir e:
b:
if mem1 > mem2:
mem2 = set mem1
mem3 = set 2
endif
jump c
endfor
mem1 = foreachdir se:
c:
if mem1 > mem2:
mem2 = set mem1
mem3 = set 3
endif
jump d
endfor
mem1 = foreachdir s:
d:
if mem1 > mem2:
mem2 = set mem1
mem3 = set 4
endif
jump e
endfor
mem1 = foreachdir sw:
e:
if mem1 > mem2:
mem2 = set mem1
mem3 = set 5
endif
jump f
endfor
mem1 = foreachdir w:
f:
if mem1 > mem2:
mem2 = set mem1
mem3 = set 6
endif
jump g
endfor
mem1 = foreachdir nw:
g:
if mem1 > mem2:
mem2 = set mem1
mem3 = set 7
endif
endfor
if mem3 < 4:
if mem3 < 2:
if mem3 < 1:
pickup n
else:
pickup ne
endif
else:
if mem3 < 3:
pickup e
else:
pickup se
endif
endif
else:
if mem3 < 6:
if mem3 < 5:
pickup s
else:
pickup sw
endif
else:
if mem3 < 7:
pickup w
else:
pickup nw
endif
endif
endif
mem1 = nearest shredder
giveto mem1