Skip to content

Instantly share code, notes, and snippets.

@calebdoxsey
Last active January 22, 2020 14:57
Show Gist options
  • Save calebdoxsey/d3b1c832599bbe05ad690f3c27f04789 to your computer and use it in GitHub Desktop.
Save calebdoxsey/d3b1c832599bbe05ad690f3c27f04789 to your computer and use it in GitHub Desktop.
cmu image example
### Welcome to the sandbox!
# If you're looking for a way to get started, click on the hamburger menu
# next to the word "Sandbox" above and choose "Open"
left = 0
top = 0
img1 = Image("http://www.scil-ilc.org/wp-content/uploads/2014/12/starfield-background.png", left, top)
img2 = Image("http://www.scil-ilc.org/wp-content/uploads/2014/12/starfield-background.png", left, top+400)
def onStep():
img1.top -= 1
if img1.top == -400:
img1.top = 400
img2.top -= 1
if img2.top == -400:
img2.top = 400
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment