Write a number to guess half the mean of the number written by the others!
I wanted to develop an app to play a simpler version of the famous "Guess the 2/3 of the mean game". In my game each players has to write a number between 1 and 100, to win the game you have to guess half the mean of the numbers written by others. I use this game for educational purposes.
This project is a simple decentralized game built on the Flow blockchain using Cadence, Flow’s smart contract language. Players submit a number by signing a transaction. When the game is closed, the contract calculates half the average of all submitted numbers and declare the winner.
The logic is fully on-chain and transparent, ensuring fair computation. The contract is deployed and tested on the Flow emulator, a local development environment. We interact with the contract using the Flow CLI through transactions and scripts. Arguments are passed in Cadence-compatible JSON format. This project demonstrates basic blockchain mechanics: storage, state change, and access control. It is a simple app, that was just a starting point for doing experiments on the Flow network and with the Cadence language.
I also created two pages in html to play the game in the browser without a CDN, but due to currently broken builts those are not working.