import pygame
import Element

SCREEN_WIDHT = 800
SCREEN_HEIGHT = 606

background_image = pygame.image.load("images/background.png")
base_character = pygame.image.load("images/base.png")
#elementy stroju
head = Element.Head()


pygame.init()
screen = pygame.display.set_mode([SCREEN_WIDHT,SCREEN_HEIGHT])
clock = pygame.time.Clock()

is_game_working = True
while is_game_working:
    for event in pygame.event.get():
        if event.type == pygame.KEYDOWN:
            if event.key == pygame.K_ESCAPE:
                gra_działa = False
        elif event.type == pygame.QUIT:
            is_game_working = False
     #rysowanie tła       
    screen.blit(background_image, (0,0))
    #rysowanie postaci
    screen.blit(base_character, (270,130))
    #rysowanie elementow postaci
    screen.blit(head.getChosenImage(),(270,130))
    #wyczyszczenie ekranu
    pygame.display.flip()
    #ustalanie stałego fps na 30
    clock.tick(30)

pygame.quit()