jeudi 29 septembre 2016

Decoupling a class which is used by the lots of subclasses

Hi I have a situation like that;

enter image description here

I have different items in my design and all these items has some specific effect on the Character. There is an apply function in every item so it can use Character object and change its functionalities. But what if I change the Character function, I would have to change all the Item classes in accordance to that.

How can I decouple Item and Character efficiently?

The language I am going to use is C++ and I don't know the other variables and functions inside the Item and Character classes. I just want to decouple them.

Aucun commentaire:

Enregistrer un commentaire