diff --git a/rover.fnl b/rover.fnl index 9225d7e..b743ee6 100644 --- a/rover.fnl +++ b/rover.fnl @@ -57,7 +57,7 @@ :l (turn-left rover) _ (assert false (. "unrecognised command " string))))] (if (at-obstacle? next-move) - (merge rover {:stopped true}) + (merge rover {:stopped [next-move.x next-move.y]}) next-move))) (fn fudge-for-pole [{: y &as r}] @@ -193,7 +193,7 @@ (expect "It does not move past obstacles" (let [obstacles [[5 5] [7 5]]] (execute (rover 5 3 :n obstacles) [:f :f :f :f :f :f])) - {:x 5 :y 4 :direction :n :stopped true}) + {:x 5 :y 4 :direction :n :stopped [5 5]}) ;; "TODO: deal with the south pole special casing"