   Object Interaction
  [Non-Language-Specific]I'm having trouble deciding how I want to have objects interact.Let's say I have a paddle and a ball. Their collision effects them both. If it only effected the ball, I would send the paddle information to a function in the ball, or, at least I could do that, and vice versa.But, if it effects them both, there must be some middle ground. I could just check for this kind of thing outside of the two classes, in the main code.I know this is a pretty simple concept, but I'm just wondering how it's done best.   
  Generally speaking if something needs to know about two objects, it's best to make something like this:   o  / \\  o   orather than:o <-> oMakes things nice and clean. Seperatable. The bottom two objects can then ignore each other, and (usually) ignore the object controlling them.   ;  So basically, I should have a "3rd party" object?Like "BallPaddleCollision"?   ;Quote:Original post by UphoreumSo basically, I should have a "3rd party" object?Yes. Although an object might be overkill. A simple function would suffice, since you're only looking to take an action, and not store object state. I would probably use Collision<Ball,Paddle>(Ball&,Paddle&), Collision.BallPaddle(Ball,Paddle) or Collision(Ball$,Paddle$) depending on the language used.   ;  Thanks, that clears it up!   