There is often a need to develop systems that listen on some kind of event. If you have ever encountered even a bit of Javascript, you saw those onChange, onClick, onKeyUp, and so on. We have a concept of a subject that contains a certain state. Once that state changes, all of the listeners get … Continue reading Observer Pattern
Tag: Design Patterns
Strategy Pattern
Imagine that you need to create a game where a character is able to fight. Character should be able to pick a weapon. Different weapon would preform different action. We need the character to be able to use his fists, a knife, and a gun. Every weapon can have its own set of attributes and … Continue reading Strategy Pattern
