31 lines
540 B
Go
Raw Normal View History

package solver
import (
2025-01-21 21:43:27 +01:00
"log"
)
func Run() {
2025-01-21 21:44:21 +01:00
// Instantiate the Solver interface
solver := Solver{}
2025-01-21 21:37:53 +01:00
2025-01-23 22:39:59 +01:00
// Parse and handle flags
solver.parse_flags()
2025-01-23 20:26:43 +01:00
2025-01-21 21:32:50 +01:00
// Load blocks from CSV file
solver.load_blocks()
// Find rows that fit with the entered rows
2025-01-21 21:32:50 +01:00
solver.populate_blocks()
// Print the total number of solutions to validate
2025-01-23 20:26:43 +01:00
log.Println("Number of (potential) solutions:", solver.iter)
2025-01-21 21:37:53 +01:00
// Check the number of solutions
2025-01-23 20:26:43 +01:00
go solver.check_combinations()
solver.tracker()
2025-01-21 21:37:53 +01:00
// Print the valid solutions
2025-01-23 20:26:43 +01:00
solver.print_solutions()
}