-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathyear36-fast.7bh
More file actions
44 lines (37 loc) · 752 Bytes
/
Copy pathyear36-fast.7bh
File metadata and controls
44 lines (37 loc) · 752 Bytes
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
-- 7 Billion Humans (2215) --
-- 36: Seek and Destroy 2 --
-- INSTRUCTIONS: "Shred all cubes in each column in order from smallest
-- to biggest."
-- AVAILABLE COMMANDS: step, pickUp, drop, giveTo, nearest, set, if,
-- jump, end, comment
-- SIZE: 16 commands (challenge 10, shortest known 8)
-- BEST AVERAGE RUNTIME: 129 seconds (challenge 145, fastest known 69)
mem2 = nearest shredder
a:
mem1 = set nothing
b:
step n
step n
step n
if s == datacube and
mem1 == nothing or
s < mem1:
mem1 = set s
endif
if c == datacube and
mem1 == nothing or
c < mem1:
mem1 = set c
endif
if n == datacube and
mem1 == nothing or
n < mem1:
mem1 = set n
endif
if n == wall:
pickup mem1
giveto mem2
jump a
endif
jump b
-- vim: set autoindent noexpandtab