 (defn Turtle [{:keys [x y dir]}]
   [:g
    {:transform
-    (str "translate(" x "," y ")" "rotate(" (dir-to-rotation dir) ")")
+    (str "translate(" x "," y ")" "rotate(" (dir-to-rotation dir) " 0.5 0.5)")
     }
    (for [c turtle-circles]
      [:circle (merge c  {

(defn dir-to-offset [dir]
  (case dir
    :N [0 -1]
    :E [-1 0]
    :S [0 1]
    :W [1 0]
    [0 0]))

(defn dir-to-rotation [dir]

               :style { :font-family "monospace" :width 400 :height 300 }
               :value (-> @app-state :program :code (#(apply str %)))} ]

   [:div  [CurrentCommand]]
   ])


(defn App []
  [:div {:style { :display "flex" :flex-direction "column" :align-items "center" }}
   [Board]
   [Controls]
   ])



(reagent/render-component [App]
                          (. js/document (getElementById "app")))

(defn on-js-reload []
