Added condition to check if a card is the nth matching card played