How to create a puzzle game with the mechanics of combining the three colors equal
Look in the Code Exchange:
http://developer.coronalabs.com/code/match-3-gems-puzzle-game-prototype