State based game - How to build your own Redux like engine

added by JavaScript Kicks
10/7/2019 7:42:28 AM


This article will describe shortly how to build Redux-like state machine engine. So shortly what we need to define state machine?- State itself (method which will deliver the state)- Subscribe method (which will subscribe to state changes)- Dispatch method (which will execute changes of our state engine) Lets define the draft of Redux-like function with previously defined methods getState, dispatch and subscribe.