Git Product home page Git Product logo

poker-demo's Introduction

Poker: An Oasis Game with Randomness and Non-Round Robin Turn Order

This example game was made using the Oasis game box. This is the most complex of the sample games, and if you're unfamiliar with the framework, it's best to first take a look at the following, simpler examples:

  • Tic Tac Toe: This Truffle box gives a more detailed overview of the game project, and describes how to get started with your own game.
  • Connect Four: This repository provides an example of how the game framework's Truffle box can be extended into a (slightly) more sophisticated game.
  • Battleship: This game shows an example of how secret state and initial randomness can be incorporated into your game.

Once you're familiar with the basics, this project combines everything from all the other games demonstrates how to create an Oasis game that takes advantage of confidential contract state. Poker requires that the deck be kept secret from both the players, while players' hands are confidential only to other players. In addition, the game supports multiple move options, non-round robin turns, and makes full use of the randomness API in the Oasis game framework. Are you ready to get started?

For this variant of Poker, we will be using the rules of Texas Hold'em.

Installation

This game is designed to be used from within your Contract Kit container. If you haven't already, pull the oasislabs/contract-kit image from Docker Hub.

  1. Launch your Contract Kit container:
    • docker run -v "$PWD":/project -p8545:8545 -p8546:8546 -p8080:8080 -it oasislabs/contract-kit:latest /bin/bash

The remaining steps are meant to be run in a shell inside your new oasislabs/contract-kit container.

  1. Install wasm-bindgen: cargo install wasm-bindgen-cli --vers=0.2.37 (this can take some time).
  2. Clone this repository: git clone https://github.com/oasislabs/poker-demo
  3. NPM installation: cd poker-demo && npm i

Specifying credentials

If you want to deploy on Oasis, make sure your mnemonic is defined in secrets.json. This file is not tracked by your repo, but it's imported by Truffle during migration and frontend compilation. The default Contract Kit mnemonic is already there, ready to use.

Building + Migrating

Please refer to our most up to date documentation in the Oasis Game Box repository.

poker-demo's People

Contributors

clementfung avatar andrewosh avatar willscott 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.