Programming a Guessing Game

We're going to dive deep into Move with a simple example, a single player guessing game.

The rules are simple:

  1. Pass in a number to guess
  2. The same account will guess until they get the same number
  3. When it's guessed, the game is over and can be reset.
  4. All the guesses will be kept track of, and each number can only be guessed once.

Note that this is pretty trivial from a guessing game, as the number is on-chain and public information, but it can be good for learning.