I'd probably name the callback `onTileTurnedOver()` to mark that tile as flipped, which could then call `compareTiles` to do the comparison.