Skip to content

Instantly share code, notes, and snippets.

@cassiel
Created September 18, 2012 20:40
Show Gist options
  • Save cassiel/3745719 to your computer and use it in GitHub Desktop.
Save cassiel/3745719 to your computer and use it in GitHub Desktop.
Puffdraw Bad Code 1
(defn bucket-add
"Cycle a new button/x/y into the point stash and force redraw.
Unlike the original Javascript, we
add to the front and remove from the end.
"
[me state]
(let [old (.-point_stash me)]
(set! (.-point_stash me) (cons state (drop-last old)))
(stash me state)
(.redraw (.-mgraphics me))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment