Created
September 15, 2016 17:39
-
-
Save joonazan/ffa9a69092e157830fffda7f633a5afd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pygame | |
def main(): | |
pygame.init() | |
window = pygame.display.set_mode((500, 500)) | |
clock = pygame.time.Clock() | |
y = 100 | |
while True: | |
for event in pygame.event.get(): | |
if event.type == pygame.QUIT: | |
return | |
y += 1 | |
window.fill(pygame.color.Color(0, 0, 0)) | |
pygame.draw.rect(window, pygame.color.Color(255, 0, 0), pygame.Rect(100, y, 20, 20)) | |
pygame.display.flip() | |
clock.tick(60) | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment