Looking for help make object snap to grid!

Hello i m new to lua i’m trying to understand how can i make a object snap to grid  once all objects are true scene changes.

the game type is a block drop game.

try this
http://forums.coronalabs.com/topic/37232-need-help/?fromsearch=1

try this. the code is old but may put you on the right path
https://github.com/shanser/lua-tetris

try this
http://forums.coronalabs.com/topic/37232-need-help/?fromsearch=1

try this. the code is old but may put you on the right path
https://github.com/shanser/lua-tetris