]> localhost Git - adventofcode2019.git/commitdiff
Test day12pt1
authorJack Kinsey <j.jameskinsey@gmail.com>
Fri, 13 Dec 2019 00:14:57 +0000 (19:14 -0500)
committerJack Kinsey <j.jameskinsey@gmail.com>
Fri, 20 Dec 2019 04:00:19 +0000 (23:00 -0500)
resources/day12 [new file with mode: 0644]
src/adventofcode2019/day12.clj

diff --git a/resources/day12 b/resources/day12
new file mode 100644 (file)
index 0000000..268d7c4
--- /dev/null
@@ -0,0 +1,4 @@
+<x=-3, y=15, z=-11>
+<x=3, y=13, z=-19>
+<x=-13, y=18, z=-2>
+<x=6, y=0, z=-1>
index 28ad0b2783d56ae33132fd918c0077ff65c86f13..7326e425a72c8d73c9759ee06ef7c8ef480e0d8e 100644 (file)
@@ -42,7 +42,7 @@
     (mapv velocity (reduce apply-gravity bodies all-pairs))))
 
 (defn day12 []
-  (let [input (map parse-coords (get-list-from-file (input-file)))
+  (let [input (mapv parse-coords (get-list-from-file (input-file)))
         simulate (iterate step-simulation input)] 
     (part1 (reduce + (map total-energy (nth simulate 1000))))
     #_(part2)))