Blockchain Tic Tac Toe!
Learn Ethereum Smart Contracts by building and playing the tic tac toe game!
In this tutorial, we'll load a Solidity Tic Tac Toe game in the REMIX IDE, we'll deploy a Smart Contract and start playing against each other!
Try out the Smart Contract
Open in REMIX IDE: https://remix.ethereum.org/
- Compile the Smart Contract
- Use 1 account to deploy it, this will be player 1
- Use a 2nd account to join the game, this will be player 2
- Make your moves by calling the
play
method - Call
isWinner
/isDraw
to check the status of the game
You may propose an alternative way to declare game over and a winner or dray. You may build a Web UI on top for fun. You may connect your Metamask and deploy to an actual blockchain to play against each other.