Skip to content

Commit

Permalink
chore(game): Increase default dimensions to 600x600
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe565 committed Jul 15, 2024
1 parent 7f4347f commit 9c360bc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/cli-of-life.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
```

4 changes: 2 additions & 2 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func New() *Config {
return &Config{
FileFormat: "auto",
RuleString: pattern.GameOfLife().String(),
Width: 400,
Height: 400,
Width: 600,
Height: 600,
}
}
4 changes: 2 additions & 2 deletions internal/game/opts.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
}
Expand Down

0 comments on commit 9c360bc

Please sign in to comment.