#!/bin/python
import pygame, sys
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")
while True:
sc.fill((125,125,125))
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
sys.exit()
pygame.draw.polygon(sc, blue, ((20,200),(240,0),(500,200)))
pygame.draw.rect(sc, green, (50, 200, 400,400))
pygame.draw.rect(sc, red, (150, 300, 150,150))
pygame.display.flip()
|