types.go 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. package controller
  2. import (
  3. "time"
  4. "gitea.ligthert.net/golang/sudoku-funpark/outputter"
  5. )
  6. // Simple interface to store values shared amongst packages.
  7. type Controller struct {
  8. // All possible blocks/rows available
  9. Blocks []string
  10. // 1st row of the Sudoku puzzle.
  11. Row1 string
  12. // 2nd row of the Sudoku puzzle.
  13. Row2 string
  14. // 3rd row of the Sudoku puzzle.
  15. Row3 string
  16. // 4th row of the Sudoku puzzle.
  17. Row4 string
  18. // 5th row of the Sudoku puzzle.
  19. Row5 string
  20. // 6th row of the Sudoku puzzle.
  21. Row6 string
  22. // 7th row of the Sudoku puzzle.
  23. Row7 string
  24. // 8th row of the Sudoku puzzle.
  25. Row8 string
  26. // 9th row of the Sudoku puzzle.
  27. Row9 string
  28. // Slice with all found solutions.
  29. Solutions [][]string
  30. // Number of CPUs Go routines are allowed to use.
  31. NumCPUs int
  32. // Number of parts the search should be split into.
  33. Split int
  34. // Which part of the search should the solver focus on.
  35. Part int
  36. // Type of output requested
  37. Output string
  38. // Select printing method
  39. Print string
  40. // Outputter package
  41. Outputter *outputter.Outputter
  42. // Duration of the job
  43. Duration time.Duration
  44. // Calculate avg rate
  45. Rates []uint64
  46. }