What about a pure JavaScript class which handles everything you need in a HTML5 Draw and Match game like “Grindstone” allowing you to focus only on input management and animations? Full source code and Phaser 3 example included
Read all posts about "Grindstone" game