import pygame
import random
import sys
FPS = 60
W = 500
H = 500
WHITE = (255, 255, 255)
YELLOW = (225, 225, 0)
sc = pygame.display.set_mode((W, H))
clock = pygame.time.Clock()
pygame.font.init()
x = 0
y = 0
size = 500
sc.fill(WHITE)
while 1:
for i in pygame.event.get():
if i.type == pygame.QUIT:
sys.exit()
sc.fill(WHITE)
f1 = pygame.font.Font(None, 36)
text1 = f1.render('Привет', True,(180, 0, 0))
sc.blit(text1, (x, y))
x = x + 5
if x == 500:
y = y + 25
x = 0
pygame.display.update()
clock.tick(FPS)
|