Circular class dependency

Posted by shad0w on Game Development See other posts from Game Development or by shad0w
Published on 2012-05-30T06:36:19Z Indexed on 2012/05/30 17:02 UTC
Read the original article Hit count: 211

Filed under:
|
|

Is it bad design to have 2 classes which need each other?

I'm writing a small game in which I have a GameEngine class which has got a few GameState objects. To access several rendering methods, these GameState objects also need to know the GameEngine class - so it's a circular dependency.

Would you call this bad design? I am just asking, because I am not quite sure and at this time I am still able to refactor these things.

© Game Development or respective owner

Related posts about c++

Related posts about engine