def get_gap(card1, card2):
    """ Return how many spaces are between the ranks of 2 cards.
        Example: For 87, 8 - 7 = 1, but the gap is actually 0. Paired cards have no gap.
    """
    if card1.rank == card2.rank:
        return -1

    return abs(card1.val() - card2.val()) - 1