Code Monkey home page Code Monkey logo

ethereum-battleship's Introduction

Playing Battleship on Ethereum

Project objective

The project required the implementation of the Battleship game on the Ethereum blockchain, so that the properties of the blockchain, i.e. tamper-freeness, the possibility of auditing the fair rules of the game, encoded in smart contracts, instant and secure reward payments, and secure rewarding implementation, could be exploited. Furthermore, implementing the game on a permissionless blockchain implies that participating in the game cannot be prevented from anyone, since there is no censoring authority.

Usage

To use this project, first download its latest release. Then:

  1. start a local blockchain instance with Ganache UI, port 7545
  2. from inside the ethereum-battleship/ folder, run npm ci and then truffle migrate
  3. from inside the ethereum-battleship/frontend/ folder, run npm ci and then npm run dev

This will automatically open the webpage in a browser. Open the same page in a different browser to play locally. In both browsers you'll need to setup a different MetaMask account on the correct network.

Tests

To evaluate the gas cost, run truffle test from inside the ethereum-battleship/ folder. The outputs will be printed in the console.

Documentation

Please see the project report for the design choices, gas evaluation, potential vulnerabilities and user manual.

ethereum-battleship's People

Contributors

theasel avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.