26
export/human-readable.go
Normal file
26
export/human-readable.go
Normal file
@ -0,0 +1,26 @@
|
||||
package export
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
)
|
||||
|
||||
func (export *Export) PrintSolutions() {
|
||||
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] + "╢")
|
||||
fmt.Println("╚═══════════╝")
|
||||
}
|
||||
}
|
7
export/types.go
Normal file
7
export/types.go
Normal file
@ -0,0 +1,7 @@
|
||||
package export
|
||||
|
||||
import "gitea.ligthert.net/golang/sudoku-funpark/controller"
|
||||
|
||||
type Export struct {
|
||||
Controller *controller.Controller
|
||||
}
|
Reference in New Issue
Block a user