stash.go 972 B

12345678910111213141516171819202122232425262728
  1. package solver
  2. import (
  3. "fmt"
  4. "strconv"
  5. )
  6. func (solver *Solver) render_combination(row1 int, row2 int, row3 int, row4 int, row5 int, row6 int, row7 int, row8 int, row9 int) string {
  7. row1s := strconv.Itoa(row1)
  8. row2s := strconv.Itoa(row2)
  9. row3s := strconv.Itoa(row3)
  10. row4s := strconv.Itoa(row4)
  11. row5s := strconv.Itoa(row5)
  12. row6s := strconv.Itoa(row6)
  13. row7s := strconv.Itoa(row7)
  14. row8s := strconv.Itoa(row8)
  15. row9s := strconv.Itoa(row9)
  16. // combination = row1s + "\n" + row2s + "\n" + row3s + "\n" + row4s + "\n" + row5s + "\n" + row6s + "\n" + row7s + "\n" + row8s + "\n" + row9s + "\n"
  17. return row1s + "\n" + row2s + "\n" + row3s + "\n" + row4s + "\n" + row5s + "\n" + row6s + "\n" + row7s + "\n" + row8s + "\n" + row9s + "\n"
  18. }
  19. func (solver *Solver) print_block(block int) {
  20. digits := strconv.Itoa(block)
  21. fmt.Printf("%c %c %c\n%c %c %c\n%c %c %c\n\n", digits[0], digits[1], digits[2], digits[3], digits[4], digits[5], digits[6], digits[7], digits[8])
  22. }