aboutsummaryrefslogtreecommitdiff
path: root/internal/casino/config_validate.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/casino/config_validate.go')
-rw-r--r--internal/casino/config_validate.go13
1 files changed, 7 insertions, 6 deletions
diff --git a/internal/casino/config_validate.go b/internal/casino/config_validate.go
index a03cfbf..9b9759c 100644
--- a/internal/casino/config_validate.go
+++ b/internal/casino/config_validate.go
@@ -26,8 +26,8 @@ func (c MachineConfig) Validate() error {
return fmt.Errorf("payout must be finite and between 0 and 1 (0 uses the default)")
}
// The machine's effective profile is the built-in one scaled to the
- // configured RTP; ValidateRTP certifies that profile, so it must be a
- // geometry the runtime evaluator can actually play.
+ // configured RTP; it must be a geometry the runtime evaluator can
+ // actually play.
return machineSlotProfile(c).Validate()
}
@@ -160,9 +160,10 @@ const baccaratRoundCards = 6
// Validate checks a slot profile the machine can actually play. The runtime
// evaluator (generateSlotSpinWithProfile, matchingLength, stoppedScatters and
// evaluateSlot) is pinned to the SlotSpin grid of three rows by five reels;
-// CalculateRTP/ValidateRTP are generic over Rows/Reels/Ways, so a profile
-// with another geometry would be certified by the RTP gate and then played as
-// a different game. Rejecting the geometry here keeps that gate meaningful.
+// CalculateRTP also assumes that geometry (fixed 3..5 symbol runs and a
+// five-reel no-match term). A profile with another geometry would be
+// certified by the RTP gate and then played as a different game. Rejecting
+// the geometry here keeps that gate meaningful.
func (p SlotProfile) Validate() error {
profile := p.Normalize()
if profile.Rows != slotGridRows || profile.Reels != slotGridReels {
@@ -268,7 +269,7 @@ func ValidateRoomConfigs(tables []TableConfig, machines []MachineConfig) error {
for _, c := range tables {
if c.Game == GameSlots {
// A slots "table" is instantiated as the room's slots machine.
- legacy := MachineConfig{ID: c.ID, Game: GameSlots, MinBet: c.MinBet, MaxBet: c.MaxBet}
+ legacy := LegacySlotMachine(c)
check("legacy slots", c.ID, legacy.Validate())
checkAddressable(strings.ToLower(string(GameSlots)), c.ID)
continue