Skip to content

Instantly share code, notes, and snippets.

@OneSadCookie
Created May 9, 2011 05:16
Show Gist options
  • Save OneSadCookie/962092 to your computer and use it in GitHub Desktop.
Save OneSadCookie/962092 to your computer and use it in GitHub Desktop.
coffeescript example for sam
MoveCircles: (deltaY) ->
for circle, i in circles # assuming numCires = circles.length, anyway...
do (circle) =>
if circle[1] - circle[2] > height
circle[0] = Math.random() * width
circle[2] = Math.random() * 100
circle[1] = 0 - circle[2]
circle[3] = Math.random() / 2
else
circle[1] += deltaY
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment