"Advantage play" has been in the news lately as actor Ben Affleck was ejected from a blackjack game at the Hard Rock Casino in Las Vegas and professional gambler Phil Ivey lost a lawsuit trying to force a casino to pay him his blackjack earnings, which the casino alleged were gained through cheating.

But is advantage play, such as card counting, really cheating, or is it just working the system? Should a casino be allowed to withhold winnings from someone simply because he or she is a skilled player with a talent that sets him or her apart from the other players?

In order to understand the legal and ethical lines around card counting, you've got to first understand what card counting entails. It's not the memorization of every card in the deck; rather, it is a system that assigns value to high and low cards that are played in order to determine the likelihood of a hand being "hot" or not. Jeff Ma, one of the card-counting MIT students who won millions from Vegas casinos describes it this way: "Basically, blackjack is the only game in the casino with a memory, meaning what you see impacts what you will see. In blackjack, it's been determined that when there are a lot of low cards left in the deck, it's in the dealer's favor. When there are a lot of high cards, it's in the player's favor. All you're doing is tracking."

Essentially, card counting is simply a matter of paying close(r) attention and using basic math to bet when the odds are in your favor. In general, blackjack gives a 0.5 percent advantage to the house. Card counters give themselves approximately a 1.5 percent advantage over the house.

So is card counting cheating? Is it illegal?

If the only tools utilized to count cards are your brain and your mathematical prowess, well then, no. It is not illegal, per se. Moreover, one of two major cases involving card counters versus casinos, Chen v. Nevada State Gaming Control Board, explicitly finds that card counting is not cheating. However, that finding does little good for advantage players, as the court ruled that, as private entities, casinos can ban anyone from their property for any reason at all -- with the exception of discrimination against a person because of a "protected class" such as race, creed, gender, national origin, age or disability.

As you might have guessed, most casinos will never be considered philanthropic organizations. Casinos are out to make a profit, and the risk of losing money to a skilled player is enough reason to kick a card counter off the property -- because, sadly, "being really good at blackjack" isn't a protected class.

But that's Nevada. Get caught counting cards in Las Vegas, and you'll get kicked out of the casino. In Atlantic City, casinos can't ban you from the property for counting cards. They can, however, place betting restrictions and otherwise "back off" card counters.

Typically, unless a player uses fraud to win the game, the player is entitled to the winnings he or she obtained before being ejected from the game. The aforementioned case ordered more than \$40,000 in seized winnings returned to Richard Chen, who admittedly counted cards but did not commit fraud in playing the game. And even if he did commit fraud, he didn't get caught.

The Phil Ivey case, however, had a much different outcome in London. Ivey won more than \$22 million from The Borgata in Atlantic City and Crockfords in London. He requested certain conditions -- a specific brand of cards, an automatic shuffler and a dealer who spoke Mandarin -- and the casinos, chalking the requests up to superstition, granted his requests. When he was able to win millions of dollars, the casinos cried foul, saying the champion poker player cheated.

Ivey denied cheating, saying, "It's my job to try to exploit weaknesses in the house and try to give myself the best opportunity to win."

That sounds reasonable enough. Isn't that why athletes watch game film and fighters watch their opponents' matches? Aren't they trying to exploit weaknesses and gain an advantage as well?

Regardless, The Borgata has sued Ivey, trying to recover the \$9.6 million he won.

Crockfords refused to pay the \$12.4 million Ivey won there, and Ivey sued for his winnings. However, Britain's High Court ruled in favor of the casino, saying that the "edge-sorting" technique used by Ivey was "not legitimate," and therefore the casino didn't have to pay up.

It will be interesting to see if the British ruling has any impact on the lawsuit filed in Atlantic City.

Still, while card counting may get you banned from a casino, it is not against the law -- an important fact to remember if a casino tries to detain you. Just like many other situations, there is a fine line between walking the straight and narrow and committing a crime. I seriously doubt anyone is born with the ability to count cards strait out of the womb. Even if you are born with a certain proclivity for numbers, you would still need to hone your skills to truly put them to work. As they say, practice makes perfect.

Some people just have an advantage, and they shouldn't be put at a disadvantage because of it. However, different jurisdictions obviously have different feelings towards card-counting.

So, if you plan on taking your abilities to the big stage without being accused of fraud, your best bet is to follow the advice of "The Gambler" Kenny Rogers: "know when to walk away; know when to run."