This module is the modified version of baccarat-engine from jconradi and events.
Credits to baccarat-engine and events.
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 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();
}