| 123456789101112131415161718192021 |
- package export
- import (
- "fmt"
- "log"
- )
- // Print solutions into a human friendly format for in the console.
- func (export *Export) PrintHumanReadableSolutions() {
- 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("╚═══════════╝")
- }
- }
|