age-of-sail/scratches/bootstrap.clj

17 lines
374 B
Clojure

;; you should be in space-sim.core>
(def my-ship (ref {:position [0. 0.]
:heading (normalize [1.0 1.0])
:slots [{:type :downwind-sail :length 2 :furl 1.0}]
:velocity [1. 0.]}))
(reset! ships [my-ship])
(start-program)
@my-ship
(dosync (alter my-ship assoc :heading (normalize [0. 1.])))
(stop-program)
(show-ui)