diff options
Diffstat (limited to 'internal/casino/types.go')
| -rw-r--r-- | internal/casino/types.go | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/internal/casino/types.go b/internal/casino/types.go index e057ba6..2d4ba02 100644 --- a/internal/casino/types.go +++ b/internal/casino/types.go @@ -129,13 +129,6 @@ type MachineConfig struct { Payout float64 `yaml:"payout,omitempty"` } -// LegacySlotMachine converts a legacy slots TableConfig (older rooms declared -// slots under casino_tables) into the MachineConfig the room actually -// instantiates. Shared by validation and room lookup so the two cannot drift. -func LegacySlotMachine(c TableConfig) MachineConfig { - return MachineConfig{ID: c.ID, Game: GameSlots, MinBet: c.MinBet, MaxBet: c.MaxBet} -} - func (c MachineConfig) Normalize() MachineConfig { if c.MinBet <= 0 { c.MinBet = 1 @@ -216,6 +209,10 @@ type Wallet interface { // ResolveStake consumes ONE pending stake by wallet handle (a single // hand paid or lost while a sibling hand's round is still in flight). ResolveStake(stakeID string) + // ResolveStakesByIDs consumes the listed pending stakes in ONE save. It is + // the batched form of ResolveStake used when a losing round has several + // stakes (split/double hands) so they are not committed one save at a time. + ResolveStakesByIDs(stakeIDs ...string) // RefundOutstanding returns every pending stake to the player (chips as // chips, credits as credits) and clears the ledger. An error means the // refund could not be made durable: nothing was returned and the stakes |
