Added a comparison function to check to check for red/black alternation.