package export

import (
	"fmt"
	"strconv"
)

// Render solutions in a human friendly format.
func (export *Export) renderHumanReadable() (render string) {
	for solutionIndex, solution := range export.Controller.Solutions {
		render += fmt.Sprintln("\nSolution #" + strconv.Itoa(solutionIndex+1) + ":")
		render += fmt.Sprintln("╔═══════════╗")
		for rowIndex, row := range solution {
			if rowIndex == 3 || rowIndex == 6 {
				render += fmt.Sprintln("╟───┼───┼───╢")
			}
			render += fmt.Sprintln("║" + row[0:3] + "│" + row[3:6] + "│" + row[6:9] + "╢")
		}
		render += fmt.Sprintln("╚═══════════╝")
	}
	return
}
