A federal lawsuit was filed Tuesday against Phillip Ivey Jr., one of the world's best poker players, by the Borgata Hotel Casino & Spa in Atlantic City citing allegations that Ivey used a baccarat card-cheating scheme to win nearly $10 million.

Fox News reports that Ivey and an associate allegedly capitalized on a defect in the playing cards that were made by Gemaco Inc., a Kansas City manufacturer. The defect allowed the two to sort out good cards during a baccarat game, which the casino has called edge sorting. The defective cards did not have a uniform pattern on the back of them, and the casino alleges that there were distinguishable attributes and differences between some cards, which allowed the sorting technique to work. The duo used the technique, which violates New Jersey casino gambling regulations, on four separate baccarat games between April and October 2012, according to the lawsuit.

Ivey and his cohort used the technique by instructing a dealer to flip over cards in particular ways. The choice to flip the cards depended on if it was considered a good card such as the numbers 6, 7, 8 and 9, while the bad cards would be flipped in different directions, according to Fox.

After several hands, the good cards were arranged in such a way that Ivey could spot them coming out of the chute. Ivey requested that an automatic shuffling machine shuffle the cards so it wouldn't alter the alignment of the cards he and his friend has set up, the lawsuit claims.

The Genting Group, a major casino operater based out of Malaysia, also filed a lawsuit against Ivey in Britain's High Court regarding allegations of cheating in baccarat for which he won close to $12 million, Fox reports.

Ivey often compares himself to the Michael Jordan, Tiger Woods and Muhammad Ali of poker as he has won nine World Series of Poker bracelets.