Engine refactoring (#36, #37, #38)

I notice that I didn't have a clear understanding of where my characters should be on my grid and I was not updating all the interested "observers" about movement, spawning or de-spawning.


It's really simple to clutter you classes with unwanted dependencies just because you need to update some 3rd party code that doesn't actually belong to your class.


With respect to keeping a clear separation of concerns in the code I've implemented the observer pattern.



Observer pattern in TypeScript




© 2017-2020 Gali Interactive

Terms and conditions | Privacy Policy | Code of Conduct | Contact