1.0.7 • Published 5 years ago

roulette-dande v1.0.7

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

Main Points

The goal is to have a complete and working roulette system, with bet and credit management. In this package you can send information, arrange in certain way (explained below) and have a return of the result of all your bets.

At the moment the system is able to manage the request only per single player

Install

$ npm install roulette-dande

Usage

You can call the package with the well known syntax:

const roulette = require('roulette-dande');

First of all, you must set the initial credit of the player, using the setCredit(credit) method like this:

var onegilliondollar = 1; // a gillion is NaN!
roulette.setCredit(onegilliondollar);

You can later know what is the player credit calling the getter method:

var playerCredit = roulette.getCredit();

Then you can have your result calling the play(array) method which require a bet array to be passed. In this way, the code will extract a single number, evaluating all the bets:

var results = roulette.play(array); 

Pay attention: the extraction will happen every time you call the play method.

The return will be an array you can handle as a JSON object, which contains:

  • Initial credit of the player
  • First bet result
  • Second bet result (if there is one)
  • Other bet result (if there are any)
  • Final credit of the player after calculations
1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago