Consider the consequences of one’s actions. Obey the rules. Succeed. ‘One’s cards’ as in a poker hand can be your path to success, but only if you are smart. The phrase implies that you must consider someone else, such as a boss, when acting, so as to get promoted, for example. (Contrast with Play one’s cards close to the chest.)
“While we had a beer together my boss said that If I played my cards right, I may get the promotion.”