Added a function to determine if the board has a pair.