Code Monkey home page Code Monkey logo

dicestart's Introduction

dicestart

Mini framework with small footprint for easy creating blockchain games Satoshidice like.

PoC game: coinflip with 50% chances to win and 1.95 odds predefined

Requirements:

  • feathercoind or any another cryptocurrency wallet that is based on bitcoind with RPC enabled
  • mysql
  • php

Installation:

  • put the files on the machine where php is installed
  • create db and dummy table ( check folder sql )

Configuration ( read the comments and set up constants/variables with your values): inc/conf.php

How to use (console): php go.php

How to create your game: If you can't figure out from play/coinflip/head.php or tail.php manual soon

Displaying results from the logs on the betting site. Example:

  • get the last N plays with: tail -N /path_to/playlogs/play_log2013-12-24.txt
  • hash the output
  • read output line by line and prepare for sending on the clientside
  • send to the client hash + data and add hash to the session
  • client pools the server with hash
  • if hash is the same, no new plays if not send new hash and data
  • on client side display only new data

TODO: Database support, debug log files,...

Donations:

BTC: 1LuckAsHuFJ3Y59aztSxzHaBtRihc2vDmX

FTC: 6sLaveXfN6Nhi96LVufa4GjrojGnXsbc4w

Licence: MIT Licence

dicestart's People

Contributors

slavco avatar

Watchers

James Cloos avatar  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.