Slot Engine is in Beta - Expect bugs!
Slot EngineSlot Engine

State

Access the simulation state from the game context


Introduction

The core game state holds useful information about the current simulation.

Most of the state is handled automatically during simulation, or when calling service methods. You won't need to touch most of it. Defined custom additional state is available under ctx.state.userData

Wrong usage can break simulations!

Properties

PropertyTypeDescription
currentGameModestringThe name of the currently simulated game mode.
Serves internal purposes only. Do not modify!
currentSpinTypestringAs defined under SPIN_TYPE.
currentResultSetResultSetThe current result set. Useful to conditionally do things to achieve certain outcomes.
Serves internal purposes only. Do not modify!
isCriteriaMetbooleanServes internal purposes only. Do not modify!
currentFreespinAmountnumberStores the number of remaining free spins. Increased using awardFreespins() from game service. Reduce manually.
totalFreespinAmountnumberStores the number of total awarded free spins. Increased using awardFreespins() from game service. Don't reduce.
triggeredFreespinsbooleanWhether free spins were triggered. Set using awardFreespins() from game service.
triggeredMaxWinbooleanWhether a max win was triggered. Set automatically at the end of a simulation.
userDataRecord<string, any>Custom user state as defined in the game config. Do with it what you want.

Use of AI on this page: All texts were initially written by hand and many were later revised by AI for improved flow. All AI generated revisions were carefully reviewed and edited as needed.

On this page