Play Your Cards Right

What does the idiom “play your cards right” mean?

Definition: Exploit a situation to your best advantage

Example: If you play your cards right, you can make enough money to retire in five years.