Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add FOMO3D game implementation (#3344)
# Description This PR introduces FOMO3D, a blockchain-based game that combines lottery and investment mechanics, implemented as a Gno realm. The game creates an engaging economic model where players compete to be the last key purchaser while earning dividends from subsequent purchases. ### Key Features - Players purchase keys using GNOT tokens - Each key purchase: - Extends the game timer - Increases key price by 1% - Makes buyer potential jackpot winner - Distributes dividends to existing key holders - Automatic prize distribution: - 47% to jackpot (winner) - 28% as dividends to key holders - 20% to next round's starting pot - 5% as a fee to the contract owner - Full test coverage ### Technical Implementation - Utilizes AVL tree for player data storage - Implements dividend distribution system - Includes comprehensive test suite - Features markdown-formatted render functions for game state visualization - Mints a unique FOMO3D NFT to the winner of each round ### How to Use 1. Start game with `StartGame()` 2. Purchase keys with `BuyKeys()` 3. Claim dividends with `ClaimDividends()` 4. View game status via render functions 5. Winner automatically receives jackpot when timer expires ### Testing All core functionalities are covered by unit tests including: - Full game flow - Key purchasing mechanics - Dividend distribution - Game ending conditions Inspired by the original Ethereum FOMO3D game but rebuilt for the Gno platform. ## Note The test checks will not pass until [#3495](#3495) is merged. In case this PR is not approved, I will refactor the NFT feature accordingly. --------- Signed-off-by: gfanton <[email protected]> Signed-off-by: Norman Meier <[email protected]> Signed-off-by: Norman <[email protected]> Signed-off-by: Norman <[email protected]> Co-authored-by: Nathan Toups <[email protected]> Co-authored-by: Leon Hudak <[email protected]> Co-authored-by: Alexis Colin <[email protected]> Co-authored-by: gfanton <[email protected]> Co-authored-by: Mustapha <[email protected]> Co-authored-by: Morgan <[email protected]> Co-authored-by: Blake <[email protected]> Co-authored-by: n0izn0iz <[email protected]> Co-authored-by: Norman <[email protected]>
- Loading branch information