22 lines
618 B
Go
22 lines
618 B
Go
package export
|
|
|
|
import (
|
|
"fmt"
|
|
"log"
|
|
)
|
|
|
|
// Print solutions into a human friendly format for in the console.
|
|
func (export *Export) PrintHumanSolutions() {
|
|
for solutionIndex, solution := range export.Controller.Solutions {
|
|
log.Printf("\nSolution #%d:", solutionIndex+1)
|
|
fmt.Println("╔═══════════╗")
|
|
for rowIndex, row := range solution {
|
|
if rowIndex == 3 || rowIndex == 6 {
|
|
fmt.Println("╟───┼───┼───╢")
|
|
}
|
|
fmt.Println("║" + row[0:3] + "│" + row[3:6] + "│" + row[6:9] + "╢")
|
|
}
|
|
fmt.Println("╚═══════════╝")
|
|
}
|
|
}
|