projects
/
adventofcode2019.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Factor out A* implementation
[adventofcode2019.git]
/
test
/
adventofcode2019
/
day18_test.clj
diff --git
a/test/adventofcode2019/day18_test.clj
b/test/adventofcode2019/day18_test.clj
index e962b491e5cd1d23a78ef8fa2aea9eff8fa0e2e3..239dae2d8ec8d5be0b08b3faf12780423b5fe1c7 100644
(file)
--- a/
test/adventofcode2019/day18_test.clj
+++ b/
test/adventofcode2019/day18_test.clj
@@
-15,7
+15,13
@@
(is (= 2 (path-between ((build-world ["#########"
"#b.A.@.a#"
"#########"]) :t)
(is (= 2 (path-between ((build-world ["#########"
"#b.A.@.a#"
"#########"]) :t)
- [5 1] [7 1]))))
+ [5 1] [7 1])))
+ (is (= 28 (path-between ((build-world ["########################"
+ "#...............@.C.D.f#"
+ "#.######################"
+ "#.......a...c.d.A.e.F.g#"
+ "########################"]) :t)
+ [16 1] [12 3]))))
(deftest test-accessible
(is (= {\a 2}
(deftest test-accessible
(is (= {\a 2}
@@
-37,15
+43,15
@@
"#.######################"
"#.....@.a.B.c.d.A.e.F.g#"
"########################"]))))
"#.######################"
"#.....@.a.B.c.d.A.e.F.g#"
"########################"]))))
-
#_
(is (= 136 (acquire-all-keys (build-world ["#################"
-
"#i.G..c...e..H.p#"
-
"########.########"
-
"#j.A..b...f..D.o#"
-
"########@########"
-
"#k.E..a...g..B.n#"
-
"########.########"
-
"#l.F..d...h..C.m#"
-
"#################"]))))
+ (is (= 136 (acquire-all-keys (build-world ["#################"
+ "#i.G..c...e..H.p#"
+ "########.########"
+ "#j.A..b...f..D.o#"
+ "########@########"
+ "#k.E..a...g..B.n#"
+ "########.########"
+ "#l.F..d...h..C.m#"
+ "#################"]))))
(is (= 81 (acquire-all-keys (build-world ["########################"
"#@..............ac.GI.b#"
"###d#e#f################"
(is (= 81 (acquire-all-keys (build-world ["########################"
"#@..............ac.GI.b#"
"###d#e#f################"