Aleo Education Resources

repository·main·Indexed 42 days ago

https://github.com/aleonet/aleo-education

Educational resources and examples for Aleo, including a Hangman game demonstration that shows how to use Leo to commit information to the chain and update game state.

Tokens
214
Snippets
1
Records
1
Agent score
4%

What's inside Aleo Education

  1. Play the Hangman game example

    main

    The Hangman example demonstrates how to use Leo to build a game that involves committing information to the chain and using that information to update game state.

    Because Leo currently cannot create or consume records automatically, the game must be played manually using a loop of running the program, copying output, and updating an input file.

    Gameplay Loop:

    1. Run leo run to generate guesses for the dummy word.
    2. Copy the required information printed to the terminal.
    3. Paste that information into the hangman.in file.
    4. Update the letter to be guessed in hangman.in.
    5. Run leo clean to clear the previous state.
    6. Run leo run again to process the next turn.
    7. Repeat until the game is over.
    leo run
    # Copy output to hangman.in
    leo clean
    leo run