Only two 90 degree turns are allowed to draw an otherwise straight line between tiles of the same colour for a match to be valid, at which point they're removed from the board, opening up opportunities for other matches.
Path-finding algorithm is made from scratch, with some basic principles of A* applied during the development process.
Some more optimisations yet to be made, but the basics are there!