Skip to content

Latest commit

 

History

89 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Github Structure

"AI-Training" branch for the AI model training.

"blockchain" branch for smart contract implementation.

"UI" branch for the game interface

CryptoCannon Showdown

Click here to play

Play AI in a game of Battleship (also known as Sea Battle) for the chance to win some cryptocurrency.

Users bet an amount of cryptocurrency before starting a game, and then play a game against the AI. If they win, they get their crypto back plus a bit extra. They can also purchase cosmetic NFTs to customize how the game looks, like their ships.

Sequence Diagram

sequenceDiagram
    Participant AI
    Participant Game
    Participant Smart Contract
    Participant User's Wallet
    AI->>Game: Give policy
    Game->>Smart Contract: Start game, wager crypto
    Smart Contract->>User's Wallet: Get crypto from user's account
    User's Wallet->>Smart Contract: return crypto
    loop until game ends
        Game->>Smart Contract: Send move
        Game->>Smart Contract: Send and verify AI move
    end
    Game->>Smart Contract: Game finished
    Smart Contract->>User's Wallet: Pay out(if user wins)
    Game->>AI: Use game data to improve AI
    Game->>Smart Contract: Player buys cosmetic
    Smart Contract->>User's Wallet: Mint + Award NFT to user
Loading

Component Disagram

stateDiagram-v2
    SmartContract --> Game_Webapp
    AI_Model --> SmartContract
    SmartContract --> Blockchain
    Blockchain --> SmartContract
    Game_Webapp --> Player

Loading

Setup

  1. Install docker compose
  2. Run cd smart_contract; docker compose up
  3. Run pip install -r requirements.txt
  4. Run cd server; server.py

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages