Here is how you can run the tic tac toe game with local blockchain
-
Install fe lang and Foundry. Make sure that the "fe_mac" (or fe) command and the "anvil" command works well locally. Install python 3.10+
-
Compile the smart contract tictactoe.fe ./fe_mac build tictactoe.fe --overwrite or (./fe build tictactoe.fe --overwrite ) for non-mac user
-
launch "anvil" command to launch the blockchain locally. Write down the private key
-
deploy the smart contract with
"cast send --rpc-url localhost:8545 --private-key {{private_key}} --create $(cat output/TicTacToe/TicTacToe.bin)"
-
get the private key from the "anvil" command terminal and modify the file "config.ini" according the contract address and the private key. Save the file "config.ini"
-
Launch the game with
"python tictactoe.py"