From 0bc228ff34301c9be34607cf01cde7d9c9c5c1a5 Mon Sep 17 00:00:00 2001 From: Chris Hoefgen <53871533+chris-bsnake@users.noreply.github.com> Date: Mon, 5 Dec 2022 15:11:34 -0800 Subject: [PATCH] Adding default values for the Royale ruleset and game map (#119) --- maps/royale.go | 2 +- royale.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/maps/royale.go b/maps/royale.go index 69380d2..494f4c3 100644 --- a/maps/royale.go +++ b/maps/royale.go @@ -46,7 +46,7 @@ func (m RoyaleHazardsMap) PostUpdateBoard(lastBoardState *rules.BoardState, sett // Royale uses the current turn to generate hazards, not the previous turn that's in the board state turn := lastBoardState.Turn + 1 - shrinkEveryNTurns := settings.Int(rules.ParamShrinkEveryNTurns, 0) + shrinkEveryNTurns := settings.Int(rules.ParamShrinkEveryNTurns, 20) if shrinkEveryNTurns < 1 { return errors.New("royale game can't shrink more frequently than every turn") } diff --git a/royale.go b/royale.go index 88a1fcb..473ceba 100644 --- a/royale.go +++ b/royale.go @@ -23,7 +23,7 @@ func PopulateHazardsRoyale(b *BoardState, settings Settings, moves []SnakeMove) // Royale uses the current turn to generate hazards, not the previous turn that's in the board state turn := b.Turn + 1 - shrinkEveryNTurns := settings.Int(ParamShrinkEveryNTurns, 0) + shrinkEveryNTurns := settings.Int(ParamShrinkEveryNTurns, 20) if shrinkEveryNTurns < 1 { return false, errors.New("royale game can't shrink more frequently than every turn") }