Removing cards based on the rule