 (defn get-new-robot-velocity [sensed-color]
   (cond (= sensed-color "white") {:trans 50 :rot  0}
         :else                    {:trans  0 :rot 10} ) )
+
+(defn enable-start-test-buttons []
+  (doseq [b (sel [:#test-start-button-div :button])]
+    (remove-attr! b :disabled) )
+  (set-attr! (sel1 [:#stop-button-div :button]) :disabled) )
+
+(defn disable-start-test-buttons []
+  (doseq [b (sel [:#test-start-button-div :button])]
+    (set-attr! b :disabled) )
+  (remove-attr! (sel1 [:#stop-button-div :button]) :disabled) )
 
 (let [stop-simulation? (atom false)]
   (defn stop-simulation! []


(defn add-test [name start-position]
  (let [button (node [:button name])]
    (listen! button :click #(simulate start-position))
    (append! (sel1 :#test-start-button-div) (node [:div button])) ) )

(let [last-tick-time (atom 0)]

                                              (if (time-for-control-tick?)
                                                (get-new-robot-velocity sensed-color)
                                                robot-velocity )
                                              tick-time ))
         (enable-start-test-buttons) ) ) ) )

