TypeError: Missing one required positional argument
问题 I am working on a game as a side project for fun and I have run into this error and I really don't know why it is happening... Here is the code: class players: def __init__(self, location, image_file, direction): self.location = location self.image_file = image_file self.direction = direction self.rect = self.image_file.get_rect() def turn(self, direction, playerImages): keys = pygame.key.get_pressed() if keys[pygame.K_a] == True: self.direction -= 1 if self.direction < -3: self.direction = 3