Emanuele writes, in his new tutorial: "My pure JavaScript class to handle Match3 games is being downloaded a lot of times, and it’s easy to figure out why:
Match3 class handles everything happening under the hood and tells the framework how to move items on the screen, so you only need to manage input and animations.
Moreover, the class has been written in pure JavaScript, so it can be used together with any HTML5 framework and follows ECMAScript6 syntax.
I already built a Bejeweled and a Turnellio prototype using the class, so today I extended it a bit to manage Drag and Match games.
Drag and Match games are a little more complex to handle than Match3 games because you move an entire row or an entire column each time, but thanks to my class, I reduced the number of lines from almost 500 of the original prototype to about 250."