Skip to content

Commit

Permalink
fix: Added check for oddness
Browse files Browse the repository at this point in the history
  • Loading branch information
cheatsnake committed Aug 12, 2022
1 parent 1701ede commit 3ccacaa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/takuzu/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "errors"
// Create a new instance of Takuzu Core with given size
func NewCore(size int) (*Core, error) {

if size < 4 || size > 12 {
if size < 4 || size > 12 || size%2 != 0 {
return &Core{}, errors.New(incorrectSize)
}

Expand Down

0 comments on commit 3ccacaa

Please sign in to comment.