Created
April 20, 2020 20:53
-
-
Save LevBravE/46dd92e8d31434ad81d899949d33bc82 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 | |
size = width, height = 301, 301 | |
screen = pygame.display.set_mode(size) | |
running = True | |
x_pos = 0 | |
while running: | |
# внутри игрового цикл еще один цикл | |
# приема и обработки Ñообщений | |
events = pygame.event.get() | |
for event in events: | |
# при закрытии окна | |
if event.type == pygame.QUIT: | |
running = False | |
# отриÑовка и изменение ÑвойÑтв объектов | |
# ... | |
screen.fill((0, 0, 0)) | |
pygame.draw.circle(screen, (255, 0, 0), (x_pos, 200), 20) | |
x_pos += 1 | |
# обновление Ñкрана | |
pygame.display.flip() | |
pygame.quit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment