muke1908 / slot-machine-demo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This project was bootstrapped with Create React App.

DEMO: https://muke1908.github.io/slot-machine-demo/

Slot Machine

This is a slot machine implementation having following features:

  • Configurable reels (./config/slot, ./config/reel)
  • Supports bias in each reel.
  • Configurable pay tables (./config/paytable)
  • Balance indicator.
  • Debug mode - debug mode will allow you to set a symbol at any position in each reel. However, the wining combination will be decided based on the pay table configuration.

Configs

  1. Reel - /config/reel.js
Variables Description Type
symbols Array of symbols in a reel [{symbol, image}]
  1. Slot - /config/slot.js
Variables Description Type
slotSpeed No of symbol/sec while spinning Number
reelSpinDelay Delay in stopping spins from left to right Number
winningLabels Winning labels in their vertical order Array
spinDuration Spin duration in seconds Number
reelsCount No of reels in slot Number
slotBias Add bias for each reel while picking random symbol [Array]
  1. Pay Table - /config/payTable.js
Variables Description Type
spinCost No of coin required for each spin Number
winningCombination The combination that defines wining line and winning amount Array

NOTE: Pay table supports any types (horizontal) of winning combinations. The final result will consider the order of combination in the table - Winning combination will be the first matched combination in pay table

  1. Player - /config/user.js
Variables Description Type
initialBalance Balance to start session with Number
maxReloadAmount Max amount to reload at once Number
minReloadAmount Min amount to reload at once Number

Start the app

npm start

About


Languages

Language:JavaScript 93.4%Language:HTML 4.6%Language:CSS 2.0%