

import pygame as pg
import random
pg.init()

pg.display.set_caption("Metalofon")
(sirina, visina) = (600, 400)
prozor = pg.display.set_mode((sirina, visina))

prozor.fill(pg.Color("white"))
broj_plocica=9

temena = [(50, 50), (550, 150), (550, 250), (50,350)]

pg.draw.polygon(prozor, pg.Color("light yellow"), temena) 
pg.draw.polygon(prozor, pg.Color("black"), temena, 1)

for i in range(broj_plocica):
    BOJA=(random.randint(0,255),random.randint(0,255),random.randint(0,255))
    pg.draw.rect(prozor,BOJA,(55+i*55,visina//2-(280-i*28)//2,50,280-i*28))

pg.display.update()
while pg.event.wait().type != pg.QUIT:
    pass
pg.quit()





