 (def ^:const ^int w 640)
 (def ^:const ^int h 360)
 (def ^:const ^int resolution 15)
+(def ^:const ^int vehicles-no 120)
 
 (def ^:const cols (int (/ w resolution)))
 (def ^:const rows (int (/ h resolution)))

(defn draw
  "Draw on canvas"
  [canvas _ _ state]
  (let [vehicles (or state (repeatedly 120 make-vehicle))]
    (-> canvas
        (set-background :linen)
        (set-color :black 100)

                                                    (translate x y)
                                                    (rotate (v/heading v))
                                                    (line 0 0 (/ resolution 1.5) 0)
                                                    (ellipse 0 0 3 3)
                                                    (pop-matrix)))) vv))) field))
  canvas)

(deftype Vehicle [position
                  velocity
