New York state defended its fantasy sports law before the state Court of Appeals on Tuesday in the latest stage of a legal fight over whether the law violates the state constitution’s anti-gambling provision.

The case centers on a 2016 law that set up consumer safeguards and established a scheme for the registration and taxation of fantasy sports, in which players form teams of real-world athletes and vie against each other based on how well their roster performs.