I want to make some Text-Based RPG game to improve my C++ skills and learn more about programming in general. Now I'm working on Skill system and considering to use Observer pattern for handling events, such as 'Monster moved to an asjacent space' or 'Monster on the adjacent space died'. Some of those events could force player to make some action ('After X, move to Y'), so it seems good (at least for me) to use Command pattern for the actions.
The answer is if it is a good practise to combine both Observer and Command patterns and make one generate instance of another, like Observer generate Command after particuar event happened?
Aucun commentaire:
Enregistrer un commentaire