Introduction Implementing Rock-Paper-Scissors (RPS) on-chain is surprisingly tricky. The moment you choose "Rock" and send a transaction, your opponent can read your move from the public ledger. The game is over before it even starts. I tried implementing a commit-reveal pattern manually, but managing salts, preventing front-running, and ensuring fair judging logic... it quickly became a rabbit hole. That's when I turned to Midnight . I built a full-stack RPS dApp where "cheating" (looking at the opponent's move before playing) is mathematically impossible! In this article, I'll share the ZK circuit design using Midnight's smart contract language, Compact , and the hurdles I faced during development. Note What ZK protects : The ZK proof ensures "confidentiality of the move during the commit phase" (fairness). After the reveal, both moves are recorded on the public ledger. Here is what the dApp looks like: What You'll Learn Designing the "Hidden" vs. "Visible" split in Midnight.…