#!/bin/python
import pygame, sys
import random
green = (0, 255, 0)
blue = (0, 0, 128)
red = (255, 0, 0)
pygame.init()
sc = pygame.display.set_mode((640, 500))
pygame.display.set_caption("Втулка на pygame")
clock = pygame.time.Clock()
while True:
sc.fill((125,125,125))
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
sys.exit()
pygame.draw.rect(sc, (255, 255, 255),(20,100, 50, 150))
pygame.draw.rect(sc, (255, 255, 255),(70,50, 50, 250))
pygame.draw.rect(sc, (255, 255, 255),(520,100, 50, 150))
pygame.draw.rect(sc, (255, 255, 255),(470,50, 50, 250))
pygame.draw.rect(sc, (255, 255, 255),(70,140, 450,70))
pygame.display.flip()
|