1 (ns adventofcode2019.day18-test
2 (:require [clojure.test :refer :all]
3 [adventofcode2019.day18 :refer :all]))
5 (deftest test-build-world
7 :t #{[1 1] [2 1] [4 1] [5 1] [6 1] [7 1]}
8 :k {\a [7 1], \b [1 1]}
10 (build-world ["#########"
15 (is (= 2 (path-between ((build-world ["#########"
20 (deftest test-accessible
22 (accessible (build-world ["#########"
27 (is (= 8 (acquire-all-keys (build-world ["#########"
30 (is (= 86 (acquire-all-keys (build-world ["########################"
31 "#f.D.E.e.C.b.A.@.a.B.c.#"
32 "######################.#"
33 "#d.....................#"
34 "########################"]))))
35 (is (= 132 (acquire-all-keys (build-world ["########################"
36 "#...............b.C.D.f#"
37 "#.######################"
38 "#.....@.a.B.c.d.A.e.F.g#"
39 "########################"]))))
40 #_(is (= 136 (acquire-all-keys (build-world ["#################"
48 "#################"]))))
49 (is (= 81 (acquire-all-keys (build-world ["########################"
50 "#@..............ac.GI.b#"
51 "###d#e#f################"
52 "###A#B#C################"
53 "###g#h#i################"
54 "########################"])))))