I’m using this to draw my held shape in tetris
if held_shape == ‘T’or’J’or’L’or’I’or’t’or’S’or’Z’or’O’or’N’:
for j, column in enumerate(row):
if column == (0):
pygame.draw.rect(surface, shape.color, (x + jblock_size, y + iblock_size, block_size, block_size), 0)
this gives me an error that argument 1 (^^^) is tuple not a surface. It is empty, but my other version works for the next shape.
for i, line in enumerate(format):
row = list(line)
for j, column in enumerate(row):
if column == ‘0’:
pygame.draw.rect(surface, shape.color, (sx + jblock_size, sy + iblock_size, block_size, block_size), 0)
Does anyone know why?
I tried to change surface to pygame.surface.Surface(800,600) but that didn’t work. I also tried to give surface a value but that still gives an error. How do I change ‘surface’ to a surface?
Cameron Sakana is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.