diff --git a/pkg/camp/core.go b/pkg/camp/core.go index 77dd39c..8c53e70 100644 --- a/pkg/camp/core.go +++ b/pkg/camp/core.go @@ -22,14 +22,14 @@ func Generate(w, h int) (Core, error) { } func Verify(field [][]int, rowTents, columnTents []int) (VerifyResult, error) { - if len(field) > maxSideSize || len(field[0]) > maxSideSize { - return VerifyResult{}, errors.New(tooLargeFieldSize) - } - if len(field) < minSideSize || len(field[0]) < minSideSize { return VerifyResult{}, errors.New(tooSmallFieldSize) } + if len(field) > maxSideSize || len(field[0]) > maxSideSize { + return VerifyResult{}, errors.New(tooLargeFieldSize) + } + if len(field) != len(rowTents) { return VerifyResult{}, errors.New(incorrectRowTents) }