“I’m in the same group as Linda for the history project! If I play my cards right, I can ask her to the school dance.”

In a card game, you are much more likely to win if you play your cards cleverly, to give yourself as much advantage as possible. We use cards as a metaphor for other situations, where you may succeed if you handle the situation smartly and make all the right moves.