Skip to content

Commit

Permalink
Adding default values for the Royale ruleset and game map (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-bsnake authored Dec 5, 2022
1 parent 82e1999 commit 0bc228f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion maps/royale.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down
2 changes: 1 addition & 1 deletion royale.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down

0 comments on commit 0bc228f

Please sign in to comment.