Elon Musk’s $1 million lottery promotion has hit a snag in court. A judge recently ruled that the contest, in which participants could win a prize by identifying a correctly completed puzzle on the SpaceX CEO’s Twitter account, violated California lottery law. The plaintiff argued that the promotion constituted an illegal lottery because it involved a random selection of winners without the requisite permit. Musk’s attorneys argued that the contest was a game of skill, but the judge ultimately disagreed.