UI modifications, better use of binding

This commit is contained in:
2023-11-07 14:12:46 -06:00
parent 83159aef5e
commit 21ce9e8bdf
2 changed files with 55 additions and 32 deletions

View File

@@ -1,16 +1,17 @@
;; you should be in age-of-sail.core>
(def my-ship (ref {:position [0. 0.]
:name "Virginia Woolfe"
(def virginia-woolfe (ref {:position [0. 0.]
:name "Virginia Woolfe"
:heading (normalize [1.0 1.0])
:slots [{:type :downwind-sail :length 2 :furl 1.0}]
:velocity [1. 0.]}))
(def revenge (ref {:position [0. 0.]
:name "Revenge"
:heading (normalize [1.0 1.0])
:slots [{:type :downwind-sail :length 2 :furl 1.0}]
:velocity [1. 0.]}))
(reset! ships [my-ship])
(reset! ships [virginia-woolfe revenge])
(start-program)
@my-ship
(stop-program)
(show-ui)
@tracked-ship