Giter Site home page Giter Site logo

slots's Introduction

SLOTS

Simple REST-API for slot game

Task description

It should be REST api with 1 implemented action to create SPIN

POST /api/machines/atkins-diet/spins

Request is JWT token with this payload:

{
    "uid": "some_user_ID",
    "chips": 10000,
    "bet": 1000
}

Result:

{
    "total": 0, // total win
    "spins": [
        {
            "type": "main", // can be main or free spins
            "total": 0, // winning in spin
            "stops": [ // real stops
                13,
                18,
                9
            ]
        }
    ],
    "jwt": {
        "uid": "some_user_ID",
        "chips": 9800,
        "bet": 1000
    }
}

On each request service should take user balance in chips, decrease it by bet size and calculate spin or spins (if user got free spins) result. And generate new jwt token with new balance for response.

Service should be designed extendable to support different machines (currently it’s only one) Service should be implemented with high load in mind.

To get paylines please mouse over the numbers on the left or right here https://wizardofodds.com/play/slots/atkins-diet/ You will see how paylines are defined. You can actually play this machine and test payout with your implementation (just press play).

slots's People

Contributors

kainobor avatar

Stargazers

 avatar Natalia Kaminska avatar

Watchers

 avatar

Forkers

bshiroya ironnman

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.