# Mutual Dependencies

**URL:** <https://forum.kirupa.com/t/mutual-dependencies/311495>\
**Category:** programming\
**Created:** [July 8, 2010, 9:23am UTC](https://forum.kirupa.com/t/mutual-dependencies/311495 "2010-07-08T09:23:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Krabex](https://avatars.discourse-cdn.com/v4/letter/k/4da419/32.png) [@Krabex](https://forum.kirupa.com/u/Krabex)\
**Post date:** [July 8, 2010, 9:23am UTC](https://forum.kirupa.com/t/mutual-dependencies/311495/1 "2010-07-08T09:23:35Z")

</div>

Hey there - I’m trying to get my head around avoiding ‘Mutual Dependencies’. As in class A including class B and class B including class A.

But I’ve run into a scenario where i feel like its the only option. Your opinions would be greatly appreciated.

I have a ‘World’ class and an ‘Entity’ class, ideally i want my Entities to have a reference to their world so they can in turn create Entities. For example a Ship making projectiles.

But there we have it… World \<—\> Entity! I can’t for the love of me work a way round it.

Thanks in advance! :love\_heart:
