Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@MarcoPolo
Created April 16, 2014 21:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MarcoPolo/10933024 to your computer and use it in GitHub Desktop.
Save MarcoPolo/10933024 to your computer and use it in GitHub Desktop.
(defn play-time-travel [entities]
(doseq [e entities
:let [actions (:actions @e)
prev-actions (:prev-actions @e)]]
(when (and (actions :travel-back)
(not (prev-actions :travel-back)))
;;play sound
)
(swap! e assoc :prev-actions actions)
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment