From 9c360bc3665162457bab80cabc3917e8fab6b910 Mon Sep 17 00:00:00 2001 From: Gabe Cook Date: Mon, 15 Jul 2024 00:44:05 -0500 Subject: [PATCH] chore(game): Increase default dimensions to 600x600 --- docs/cli-of-life.md | 4 ++-- internal/config/config.go | 4 ++-- internal/game/opts.go | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/cli-of-life.md b/docs/cli-of-life.md index 0af357f..707222d 100644 --- a/docs/cli-of-life.md +++ b/docs/cli-of-life.md @@ -12,10 +12,10 @@ cli-of-life [flags] --completion string Output command-line completion code for the specified shell (one of: bash, zsh, fish, powershell) -f, --file string Loads a pattern file on startup --file-format string File format (one of: auto, rle, plaintext) (default "auto") - --height uint Board height. Will be ignored if a larger pattern is loaded. (default 400) + --height uint Board height. Will be ignored if a larger pattern is loaded. (default 600) -h, --help help for cli-of-life --play Play on startup --rule-string string Rule string to use. This will be ignored if a pattern file is loaded. (default "B3/S23") - --width uint Board width. Will be ignored if a larger pattern is loaded. (default 400) + --width uint Board width. Will be ignored if a larger pattern is loaded. (default 600) ``` diff --git a/internal/config/config.go b/internal/config/config.go index 95f14a1..76aa366 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -17,7 +17,7 @@ func New() *Config { return &Config{ FileFormat: "auto", RuleString: pattern.GameOfLife().String(), - Width: 400, - Height: 400, + Width: 600, + Height: 600, } } diff --git a/internal/game/opts.go b/internal/game/opts.go index d0c3271..8562d00 100644 --- a/internal/game/opts.go +++ b/internal/game/opts.go @@ -18,8 +18,8 @@ func WithPattern(pat pattern.Pattern) Option { func WithDimensions(width, height uint) Option { return func(game *Game) { - newW := max(int(width), game.BoardW()+100) - newH := max(int(height), game.BoardH()+100) + newW := max(int(width), game.BoardW()+200) + newH := max(int(height), game.BoardH()+200) game.Resize(newW, newH, image.Pt(0, 0)) } }