I am designing factory patterns for a game and I have this two options:
-
create an abstract Factory class and derived factory classes
-
create only 1 Factory class, which will be the instantiation of all Entity types
What are the advantages/disadvantages of each? For option 1, it is a lot easier for me as a programmer since I have so many types of entities, although option 2 has better polymorphism. Why would one choose option 2 instead?
Aucun commentaire:
Enregistrer un commentaire