mCasino.api.coinflip
Game
mCasino Coinflip API
Types
CoinflipItem
interface CoinflipItem {type: numbervalue?: number}Coinflip Item
CoinflipPlayer
Coinflip Player
Functions
handleUpdate
This item only works when running on the client. ClientmCasino.api.coinflip.handleUpdate(data: {},--
The game data received from the lobby
onStart?: () → (),--
Called when the game starts
onFlip?: () → (),--
Called when the flip starts
onWin?: (flip: boolean) → ()--
Called when the game has finished
) → ()Calculates and processes crash update for client consumption
calculatePercentage
This item only works when running on the client. ClientmCasino.api.coinflip.calculatePercentage(data: {}--
The game data received from the lobby
) → (number,number)--
Player 1 & 2 percentages
Calculates the percentages of item values