RollerCoaster Tycoon 3 Soaked! ISO - Racecar56
RCT3 Soaked! ISO - Racecar56
Category:RCT games
Category:Video game franchises introduced in 2003
Category:Traveller's Tales games
Category:Video game franchisesQ:
Accessing a function from within same module
I am attempting to implement a Pong AI in Python.
I have a class Player which has functions moveUp() and moveDown(). I am attempting to access these functions from within Pong. But I get the error:
TypeError: moveUp() takes 1 positional argument but 2 were given
What is going wrong?
class Player:
def __init__(self, x_pos, y_pos, paddle_x, paddle_y, ball_x, ball_y, paddle_size, ball_size):
self.paddle_x = paddle_x
self.paddle_y = paddle_y
self.ball_x = ball_x
self.ball_y = ball_y
self.paddle_size = paddle_size
self.ball_size = ball_size
# Speed of paddle movement
self.dx = 0.1
self.dy = 0.1
# Scale of paddle
self.x_pos = x_pos
self.y_pos = y_pos
# Paddle x and y coordinates
self.paddle_x_pos = self.paddle_x - self.paddle_size
self.paddle_y_pos = self.paddle_y - self.paddle_size
# Ball x and y coordinates
self.ball_x_pos = self.ball_x - self.ball_size
self.ball_y_ be359ba680
Related links:
留言