Skip to content

Tic Tac Toe - Final Case for Patika Akbank Web3 Practicum

Notifications You must be signed in to change notification settings

0xsergen/tic-tac-toe-dapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 

Repository files navigation

Tic Tac Toe dApp

This decentralized app allows to user create/join and play Tic Tac Toe game. This project is built for Patika - Akbank Web3 Practicum's Final Project.

  • Game is built to run with smart contract which runs on Avalanche Fuji Testnet.
  • Frontend is built to ease interact with smart contracts.
  • To try app, click here.
  • If Fuji Testnet is not added in your wallet (i.e. Metamask), pop-up will be automatically shown to add.
  • If needed some test AVAX on Fuji Testnet, click here for Official Avalanche Faucet.
  • See Usage and Screenshots for details.

Rules

  • Player who create a game is defined as Player 1.
  • Game starts by Player 1.
  • Reward pool is determined by player who create a game. $(Reward Pool = 2 * entry fee)$
  • Winner gets all reward pool excluding commission.
  • If there is no winner (in case of draw) each player get their entry fee back. No commission for draw.
  • If anyone doesn't join an existing game for 1 day at least, creator of that game (Player 1) will be able to cancel that game and get their entry fee back.

Run Locally

To get started with this project, clone this repo and follow these commands:

Clone the project

  git clone https://github.com/0xsergen/tic-tac-toe-dapp.git

Go to the frontend directory of project

  cd tic-tac-toe-dapp/frontend

Install dependencies

  npm install

Build the application

  npm run build

Start the server

  npm run start

Go to your http://localhost:3000/ to check page.

You can start editing the page by modifying pages/index.js. If you have own smart contract, just modify constants.js. If you want to deploy a contract etc, create a .envfile in hardhatfolder.

  PRIVATE_KEY:"YOUR_KEY"
  RPC_URL:"RPC_URL" // 
  API_KEY:"API_KEY_SNOWTRACE" // snowtrace.io is like etherscan of Avalanche.

Usage and Screenshots


Connect your wallet and select Avalanche Fuji Testnet as network
connectWallet


Join existing game or Create a new game

joinGame

newGame


Play with your rival
gameDetails


Win the game 😎
winGame


Claim rewards
claimRewards

Contact?

twitter telegram portfolio

About

Tic Tac Toe - Final Case for Patika Akbank Web3 Practicum

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published