Writing the match-3 game