“Store and Calculate” is the basic theory of a computer.A list of images are stored,logically get one by one,the animation comes true.How about list in a dictionary with a state key then be filled in a list .A var is stored to represent the state,somehow it changed,type of state is changed,different animations come to build.
Like drawing with simple theory about “xiantiao”,“lunkuo”,“yangxing yinxing”……A simple theory is important,isn’t it?