Included checkNumPieces in the checkForMatchOnClick function