func (g Grid) Print(w io.Writer) {
	if w == nil {
		w = os.Stdout
	}
	gridStr := ""
	for _, row := range g {
		for _, sq := range row {
			var char string
			switch sq {
			case Unknown:
				char = unknownChar
			case Yes:
				char = yesChar
			case No:
				char = noChar
			}
			gridStr += char
		}
		gridStr += "\n"
	}
	fmt.Fprint(w, gridStr)
}
// Print prints out a simple representation of the board to stdout
// the writer is used to redirect to a different writer than stdout. If w is nil,
// stdout is used
Print prints out a simple representation of the board to stdout
the writer is used to redirect to a different writer than stdout. If w is nil,
stdout is used
// Print prints out a simple representation of the board to stdout // the writer is used to redirect to a different writer than stdout . If w is nil // stdout is used
func (g Grid) Print(w io.Writer) {
	if w == nil {
		w = os.Stdout
	}
	gridStr := ""
	for _, row := range g {
		for _, sq := range row {
			var char string
			switch sq {
			case Unknown:
				char = unknownChar
			case Yes:
				char = yesChar
			case No:
				char = noChar
			}
			gridStr += char
		}
		gridStr += "\n"
	}
	fmt.Fprint(w, gridStr)
}
func ( g Grid ) Print ( w io . Writer ) { if w == nil { w = os . Stdout } gridStr := " " for _ , row := range g { for _ , sq := range row { var char string switch sq { case Unknown : char = unknownChar case Yes : char = yesChar case No : char = noChar } gridStr += char } gridStr += " \n " } fmt . Fprint ( w , gridStr ) }
Print prints out a simple representation of the board to stdout
the writer is used to redirect to a different writer than stdout.
Print prints out a simple representation of the board to stdout the writer is used to redirect to a different writer than stdout .