Hi,
First I want to thank you for sharing this. I'm new to javascript and it's being hard to figure out how to implement all those patterns I learn to use in classsical languages to javascript. Your repo iy's being really useful :D
Just aquestion about the State pattern. Its implementation is pretty much standard, but I can't see what makes the different concrete state functions inherit form the State "abstract" one. Can you explain how it's done or how to do it?
Inherit from State where all the methods are abstract is similar to implement an Interface.
It allows you to get an error if the inherited method is not overwriten.
Thanks.
Hi, First I want to thank you for sharing this. I'm new to javascript and it's being hard to figure out how to implement all those patterns I learn to use in classsical languages to javascript. Your repo iy's being really useful :D Just aquestion about the State pattern. Its implementation is pretty much standard, but I can't see what makes the different concrete state functions inherit form the State "abstract" one. Can you explain how it's done or how to do it?
Thanks again!! Cheers!