Change internal Solution storage to [][]string (Closes #24)
This commit is contained in:
@ -5,7 +5,7 @@ import (
|
||||
)
|
||||
|
||||
// Prepare a valid solution for storage.
|
||||
func (solver *Solver) renderCombination(row1 int, row2 int, row3 int, row4 int, row5 int, row6 int, row7 int, row8 int, row9 int) string {
|
||||
func (solver *Solver) renderCombination(row1 int, row2 int, row3 int, row4 int, row5 int, row6 int, row7 int, row8 int, row9 int) []string {
|
||||
|
||||
row1s := strconv.Itoa(row1)
|
||||
row2s := strconv.Itoa(row2)
|
||||
@ -17,5 +17,5 @@ func (solver *Solver) renderCombination(row1 int, row2 int, row3 int, row4 int,
|
||||
row8s := strconv.Itoa(row8)
|
||||
row9s := strconv.Itoa(row9)
|
||||
|
||||
return row1s + "\n" + row2s + "\n" + row3s + "\n" + row4s + "\n" + row5s + "\n" + row6s + "\n" + row7s + "\n" + row8s + "\n" + row9s + "\n"
|
||||
return []string{row1s, row2s, row3s, row4s, row5s, row6s, row7s, row8s, row9s}
|
||||
}
|
||||
|
Reference in New Issue
Block a user