Skip to content

andre-meyer/tictactoe-dapp

Repository files navigation

Decentralized TicTacToe

codecov

This is an example TicTacToe Smart-Contract Application, running fully decentralized on Kovan. As part of a Gnosis Company Developer Challenge.

Created by Andre Meyer and David Sato

Features:

  • Event Listening MoveMade, GameHasChallenger, GameHasOpponent
  • React 16 Frontend
  • CSS-Modules
  • React HoC WithContract
  • Eventlistener API

Known Problems

  • Sometimes Metamask forgets about Event Logging (metamask-extension/#2393), if this happen the application will stop updating automatically and you need to refresh your browserpage after every turn (and your opponents turn). To fix this, restart your browser completely. If you're prompted to enter a password for metamask again, you did it right.
  • Starting a game is very expensive 🙈

To Play

Play on github.io andre-meyer.github.io/tictactoe-dapp

To Run

Clone this repositry, npm install, npm run migrate

Requires Metamask, Mist or any other Web3.js compatible Wallet. Works locally with TestRPC or Ganache.

To Develop

Install either Ganache(-cli) npm i ganache-cli -g

or the old TestRPC npm i ethereum-testrpc -g

Run in deterministic mode: ganache-cli -d or testrpc -d

Disable any web3 provider, to fallback to http://localhost:8545 (default ganache-cli port)