Boiler plate code for match-3 games like bejeweled and candy crush