slots

command module
v0.0.0-...-f4abbc8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2018 License: MIT Imports: 10 Imported by: 0

README

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).

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
src

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL