Is it bad OOP practice to have objects reference each other?

Posted by lala on Stack Overflow See other posts from Stack Overflow or by lala
Published on 2010-05-12T17:31:42Z Indexed on 2010/05/12 17:34 UTC
Read the original article Hit count: 176

Filed under:
|

Pardon my noobness. I'm making a game in which several characters have relationships with each other and they need to be able to interact with each other and store some relationship data regarding how they feel about each other.

I have an object for each character. Is it bad for each of those character objects to have an array of all the other character objects in order to perform these interactions? Is there a better way to do this?

© Stack Overflow or respective owner

Related posts about objectoriented

Related posts about references