The trickiest bit was writing the checks for the tile matches. To recap, once all the tiles have moved, the aim was to check if there were any matches of three tiles or more (not diagonally, but they didn’t have to be in straight lines as ‘L’ shapes are permitted). For a long time this function would cause the game to error. It turns out, the tiles were being checked before the animation was complete, and so empty tiles were being checked and causing a mess. Once the problem was identified, it was an easy fix.
I’ll put the game up on GitHub, but for now, the finished game can be played here.
Ashley’s Tiles – feel free to let me know what you think.