immagini = {"p": fb, "m": casellamare, "tss": casellaterrass, "tsd": casellaterrasd, "tsc":
casellaterrasc, "tssus": casellaterrassus, "tssu": casellaterrassu, "tssud":
casellaterrassud, "tsgs": casellaterrasgs, "tsg": casellaterrasg, "tsgd":
casellaterrasgd}
o = 5
q = 5
sizex = 160
sizey = 160
tabellacaselle = [ [] for g in range(o) ]
for i in range(o):
xmin = i*sizex
for j in range(q):
ymin = j*sizey
quadrati = list[op_file.readlines(i)]
tabellacaselle[i].append(casella(xmin, xmin+sizex, ymin, ymin+sizey, quadrati))
print(quadrati)
#in the while true loop
for i in range(o):
for j in range(q):
screen.blit(immagini[pic], (i*160-80, j*160-80))
I'm making my first (2d) game with pygame and I don't know how to blit the images of the boxes of the map with a dictionary and a text file.