Good morning everyone! I have a problem with an implementation of a videogame and I would ask here for some help. I have two types of action in my project, "mainaction" and "quickaction", both of them have some subclasses that would implement a specific method, "execute" for example. I would like to use the factory method to implement this situation, so I instantiate an interface called "Action" and the two classes of action would implement that interface.
my question is about how to use the factory in this case, with mainaction and quickaction or it would be better to implement a factory with the subclasses of them? how can I do it?
Aucun commentaire:
Enregistrer un commentaire