When a new law intended to crack down on illegal gambling made Luc Marcoux’s gaming business illegal two months into a new lease, he closed up shop, only to wind up—at least initially—on the losing side of an eviction lawsuit for breach of contract.

Marcoux spent years litigating with landlords Morris AR Associates LLC and Barrick Enterprises Inc. before winning a reversal from the Fourth District Court of Appeal on Wednesday on grounds he’d been cornered by a restrictive lease.