Skip to content

This is modified version of baccarat-engine from jconradi

Notifications You must be signed in to change notification settings

sithu-go/baccarat-engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm version npm

Modified Baccarat Engine

This module is the modified version of baccarat-engine from jconradi and events.

Credits to baccarat-engine and events.

Why don't use existing module

The original module works fine for the projects which uses Node.js environment like react.

But in my case, Laya air project which don't use Node.js environment.

I get error which caused by shoe.js.

In shoe.js

const EventEmitter = require('events');
Uncaught Error: Dynamic require of "events" is not supported
    at bundle.js:33:11

For that case, I adjusted using baccarat-engine and events.

Cut Cards & Burning Cards

Cut cards are part of the shoe implementation. Currently set to 16 cards before the end of the shoe, the Baccarat Game Engine will show when a burn is required.

// Create game engine (8 decks default)
gameEngine = new BaccaratGameEngine();
gameEngine.shoe.createDecks();
gameEngine.shoe.shuffle();

if (gameEngine.isBurnNeeded) {
  // Burn card is the first card drawn that determined the burn cards to use.
  var burnCard = gameEngine.burnCards();
}

Usage

Sample usage

About

This is modified version of baccarat-engine from jconradi

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published