You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello everyone, I'm a beginner in Python and while I was writing a Tetris game with the pygame library I encountered the errors figure[i].x += dx
AttributeError: 'int' object has no attribute 'x' I'll throw off the last 5 lines if necessary, I'll throw off all the lines of the project, I don't understand why this error comes up, can anyone help?
#move x
figure_old = deepcopy(figure)
for i in range(4):
figure[i].x += dx <----
if not check_borders():
figure = deepcopy(figure_old)
break