import pygame
pygame.init()
clock=pygame.time.Clock()

image = pygame.image.load('png/rocket.png')
image.set_colorkey((255, 255,0))
image_small = pygame.transform.scale(image,(25,25))


image_1 = pygame.transform.flip(image, True, False)
image_2 = pygame.transform.flip(image, True, True)
image_3 = pygame.transform.flip(image, False, True)





sc = pygame.display.set_mode((800,600))
pygame.display.set_caption("MyGame")
plaer = pygame.Rect(0,0,100,100)

cadr =0

go = True
while go:
    cadr+=1

    sc.fill((0,0,255))



    if cadr<=5 and cadr>=0:
        sc.blit(image, (20, 50))
        sc.blit(image_3, (100, 50))

    if cadr<=10 and cadr >5:
        sc.blit(image_1, (20, 50))
        sc.blit(image_2, (100, 50))

    if cadr<=15 and cadr>10:
        sc.blit(image_2, (20, 50))
        sc.blit(image_1, (100, 50))

    if cadr<=20 and cadr>15:
        sc.blit(image_3, (20, 50))
        sc.blit(image, (100, 50))
    if cadr==20:
        cadr =0

    sc.blit(image_small, (600, 50))



    pygame.draw.rect(sc,(0,0,255),plaer)   #  квадрат
    #pygame.draw.line(sc, (0,0,0), [157, 30], [290, 15], 27) # линия
    #pygame.draw.lines(sc, (0,0,0), True,[[125, 10], [357, 70], [280, 20], [100,15]], 2)   # зацикленная линия

    #pygame.draw.polygon(sc, (0,0,0),[[150, 10], [180, 50],[90, 90], [30, 30]])   #  полигон
    #pygame.draw.circle(sc, (0,255,255), (100, 100), 50)  # круг

    pygame.draw.rect(sc, (255, 255, 255), (20, 20, 200, 50))  # квадрат
    pygame.draw.rect(sc, (0, 0, 255), (20, 70, 200, 50))  # квадрат
    pygame.draw.rect(sc, (255, 0, 0), (20, 120, 200, 50))  # квадрат








    pygame.display.update()
    clock.tick(14)
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            go = False
