Mutual Dependencies

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: