How to implement Singleton design pattern when class has subclasses?
I have a Player class for a game and there are different player types: Animal, Person, Robot. I want my game to have a single instance of a player using the Singleton pattern but not sure if this is possible?
Aucun commentaire:
Enregistrer un commentaire