Change internal Solution storage to [][]string (Closes #24)
This commit is contained in:
@ -9,19 +9,13 @@ import (
|
||||
func (export *Export) PrintHumanSolutions() {
|
||||
for solutionIndex, solution := range export.Controller.Solutions {
|
||||
log.Printf("\nSolution #%d:", solutionIndex+1)
|
||||
//fmt.Println(solution)
|
||||
fmt.Println("╔═══════════╗")
|
||||
fmt.Println("║" + solution[0:3] + "│" + solution[3:6] + "│" + solution[6:9] + "╢")
|
||||
fmt.Println("║" + solution[10:13] + "│" + solution[13:16] + "│" + solution[16:19] + "╢")
|
||||
fmt.Println("║" + solution[20:23] + "│" + solution[23:26] + "│" + solution[26:29] + "╢")
|
||||
fmt.Println("╟───┼───┼───╢")
|
||||
fmt.Println("║" + solution[30:33] + "│" + solution[33:36] + "│" + solution[36:39] + "╢")
|
||||
fmt.Println("║" + solution[40:43] + "│" + solution[43:46] + "│" + solution[46:49] + "╢")
|
||||
fmt.Println("║" + solution[50:53] + "│" + solution[53:56] + "│" + solution[56:59] + "╢")
|
||||
fmt.Println("╟───┼───┼───╢")
|
||||
fmt.Println("║" + solution[60:63] + "│" + solution[63:66] + "│" + solution[66:69] + "╢")
|
||||
fmt.Println("║" + solution[70:73] + "│" + solution[73:76] + "│" + solution[76:79] + "╢")
|
||||
fmt.Println("║" + solution[80:83] + "│" + solution[83:86] + "│" + solution[86:89] + "╢")
|
||||
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("╚═══════════╝")
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user