Since we have built the circuit and the smart contract, the next thing to do is to integrate them into a frontend so users can easily interact with the contract.
You can get it with following command:
git clone https://github.com/sCrypt-Inc/zk-battleship
You can run the following commands to setup and run the project quickly:
npm install npm start
If you modify the circuit or sCrypt contract, you need to run the
setup command to generate assets again. Otherwise you do not have to run it.
npm run setup
The setup script will:
publicfolder as assets;
In order to play the game, you need to:
You can now visit
http://localhost:3000 in Chrome browser, or you could try the online version here.
We build the frontend based on this project.