agents
agents copied to clipboard
figure[i].x += dx AttributeError: 'int' object has no attribute 'x' python
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