Aleo-Monopoly v2: The use of Leo Programming

Emmanuel LinusEmmanuel Linus
2 min read

what's Leo programming?

Welcome to the Leo programming language. Leo is a functional, statically-typed programming language built for writing private applications. Leo is a high-level programming language that compiles down to low-level Aleo Instructions.

My First Leo Game Program

Aleo-Monopoly is a simple game in the Leo programming, This consists of two players (owner and addr1) who purchase a building to earn reward by rent, sale function. Every Function is stored in the Building Record.

User's Story

User Story

  1. Emma and Alice are given 10000 tokens each in their account to begin the game
  1. Emma purchases the white Building for 1500 tokens, and Alice purchases the black Building for 1000 tokens
  1. if Emma rolls a 3 out of 6 dice roll, He gets a rent a 150 tokens, If Alice rolls a 5 out of 6 dice roll, she gets a rent of 100 tokens. Else if both roll out of their order, they pay the rent
  1. Emma chooses to sale his Building, Alice is willing to purchase it, but she doesn't have enough token

  2. Alice seeks the Bank for some loan at an interest that she triggers to purchase Emma’s Building

  3. The request is accepted, Emma’s Building is given to Alice and Alice’s token is sent to Emma's account.

  4. The Game ends when Alice buys Emma’s Building or vice versa as it maybe...

WHY PRIVACY??

Every user address that records a transaction on this project has its transaction record private using the ZK-cryptography tool. Every record is stored and only players playing within themselves can view their respective records, and blocks.


Requirement Tools I used

  1. Visual Studio Code Editor

  2. Leo programming extension

  3. Python 3.8

  4. slingshot-cli (ie for developing applications locally )


Github Link: Aleo-Monopoly

YOUTUBE: Video URL

Awesome Projects: Aleo-Awesome

20
Subscribe to my newsletter

Read articles from Emmanuel Linus directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Emmanuel Linus
Emmanuel Linus

I'm a nerd!