Is there any way to pass the arguments from one class to another?
in
Programming Questions
•
2 years ago
I have a project I'm working on to make pong for a class I'm taking. I have to put each object in its own class, and so right now I'm trying to pass the arguments for the Paddle locations so that the ball bounces off the paddles when it hits the paddle's coordinates. My professor tried to explain it to me in class but he was in a rush so I did not fully understand, if you could explain how to do this I would appreciate it. Would I need to put it in the main code, or is there a way to pass the arguments to the ball class so that way I can use them.
1