Skip to content

Instantly share code, notes, and snippets.

@KramKroc
Created May 26, 2020 21:15
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 KramKroc/9826f5917fbf85e29c6d20f6446e3de2 to your computer and use it in GitHub Desktop.
Save KramKroc/9826f5917fbf85e29c6d20f6446e3de2 to your computer and use it in GitHub Desktop.
Looping our character in and out of screen
WIDTH = 400
HEIGHT = 600
alien = Actor('alien', midbottom=(100,200))
def draw():
screen.clear()
alien.draw()
def update():
alien.left += 1
if alien.left > WIDTH:
alien.right = 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment