The sheer complexity of the code is killing my brain Click on two gems to swap them. Try to make rows of 3, 4 or 5 of the same colour which will give you points. Making rows of 4 or 5 will also give special objects which can explode a lot of stuff. I'm bad at the graphics :(
Gem costumes are the Large Gems from Terraria, taken from the Terraria Wiki.