Poker legend Phil Ivey was just ordered to return roughly $10 MILLION in baccarat winnings he pulled from an Atlantic City casino in 2012 ... after a judge ruled the way he played broke the law.
Ivey's alleged strategy is actually quite genius -- it's called "edge-sorting" and it's kind of like card counting in blackjack ... in the sense that it gives the player an advantage over the house.
Here's how it works ... the backs of baccarat cards have patterns on them that are SUPPOSED to be perfectly symmetrical, but they're not. The Borgata casino claims Ivey brought a female guest to the table who was a master at identifying the value of a card based on the pattern and she would tip him off so he could adjust his betting accordingly.
The hotel claims Ivey won more than $9.6 million in 4 visits to the hotel between April and October of 2012 using this technique.
The Borgata took him to court claiming Ivey broke the rules and they wanted their money back.
A judge has now weighed in and claimed Ivey didn't violate game rules -- but DID violate a New Jersey gambling law that's supposed to block players from using strategies like "edge-sorting" to swing the odds in their favor.
Ivey's lawyer told the AP, "What this ruling says is a player is prohibited from combining his skill and intellect and visual acuity to beat the casino at its own game."