func (cfg Config) Validate() error {
	switch {
	case cfg.NumRows < minRows:
		return errors.New("not enough rows on board, must be >= " + strconv.Itoa(minRows))
	case cfg.NumCols < minCols:
		return errors.New("not enough columns on board, must be >= " + strconv.Itoa(minCols))
	}
	return nil
}
// Validate returns an error if the number of rows or columns is invalid.
Validate returns an error if the number of rows or columns is invalid.
// Validate returns an error if the number of rows or columns is invalid .
func (cfg Config) Validate() error {
	switch {
	case cfg.NumRows < minRows:
		return errors.New("not enough rows on board, must be >= " + strconv.Itoa(minRows))
	case cfg.NumCols < minCols:
		return errors.New("not enough columns on board, must be >= " + strconv.Itoa(minCols))
	}
	return nil
}
func ( cfg Config ) Validate ( ) error { switch { case cfg . NumRows < minRows : return errors . New ( " " + strconv . Itoa ( minRows ) ) case cfg . NumCols < minCols : return errors . New ( " " + strconv . Itoa ( minCols ) ) } return nil }
Validate returns an error if the number of rows or columns is invalid.
Validate returns an error if the number of rows or columns is invalid .