A state court judge has dismissed screenwriter Jeff Grosso’s lawsuit against Miramax in which he accused the mini-major of ripping off ideas for the 1998 film “Rounders” from his “Shell Game” script.

Los Angeles Superior Court Judge Edward A. Ferns granted the defendants’ motion for summary judgment in a nine-page pretrial ruling issued Wednesday. Ferns found that there was never a legal contract between the screenwriter and Miramax, nor any of the other defendants — producers Ted Demme and Joel Stillerman and writers Brian Koppelman and David Levien. (Demme was still alive when the suit was filed.)

Key issue in the Grosso suit had been whether an “implied” contract is created when an executive hears a pitch or reads a screenplay — and there’s the expectation that if the idea gets used, the writer will be paid. But Ferns found that Grosso hadn’t established that such a contract existed.

“Even accepting plaintiff’s evidence as admissible, plaintiff has failed to raise a triable issue of fact as to whether or not an agreement may be implied from any of the defendants’ conduct,” the judge wrote.

Grosso had achieved a key breakthrough in a 2004 ruling, in which the 9th Circuit Court of Appeals turned down Miramax’s motion to dismiss Grosso’s claim that it violated its implied contract with Grosso — even though a federal court had dismissed the suit’s copyright infringement allegations. That ruling meant that Grosso could proceed in state court with his lawsuit alleging Miramax breached his implied contract.

Grosso, a freelance writer and poker player, submitted the “Shell Game” script to Gotham Entertainment in 1996 after Gotham, which had a first-look deal at Miramax, announced it accepted unsolicited scripts. He filed suit three years later.

In his ruling, Ferns found that the promise to pay Grosso was made through Gotham rather than any of the defendants and that there was no evidence that they knew of the original source of the idea or any agreement by Gotham to pay Grosso.

“Plaintiff’s theories are based upon speculation derived from publications which inform that Gotham has some sort of ‘deal’ with Miramax and the purported similarity between the ideas in ‘Rounders’ and the plaintiff’s work,” Ferns wrote. “Again, the similarity of works does not establish a contact because it does not establish the existence of a contract. Plaintiff has not provided an agreement between Gotham and Miramax, only speculation that some sort of agreement existed.”

Attorneys for Grosso did not respond to requests for comment.