Logic to display the cards