A blockchain based take on the classic battleship game
- Clone the repo
- Install dependencies with
yarn
- Build the source files with
yarn build
- Install truffle:
npm i -g truffle
Currently only the contracts package has tests
- Run
npx truffle develop
frompackages/contracts
directory yarn test
- Run a local ethereum blockchain in a separate terminal
truffle develop
frompackages/contracts
directory - Start the Oracle
node packages/oracle --secretKey <secret-key> --web3Endpoint ws://localhost:8545
- The secret key is one of the private keys that is logged by truffle
- This will create a new game
- Start serving the website
yarn start
- Setup metamask
- If not installed install the metamask browser extension
- Import one of the private keys from step one, preferably not the same one as the Oracle
- Navigate to
http://localhost:8000/<game-address>
in your browser- The game address should be logged by the oracle