1 /* 2 * Copyright 2007, Axel Dörfler, axeld@pinc-software.de. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef SUDOKU_GENERATOR_H 6 #define SUDOKU_GENERATOR_H 7 8 9 #include <vector> 10 11 #include <Messenger.h> 12 #include <SupportDefs.h> 13 14 class SudokuField; 15 16 17 class SudokuGenerator { 18 public: 19 SudokuGenerator(); 20 ~SudokuGenerator(); 21 22 void Generate(SudokuField* field, uint32 fieldsLeft, 23 BMessenger progress, volatile bool *quit); 24 25 private: 26 void _Progress(BMessenger progress, const char* text, float percent); 27 bool _HasOnlyOneSolution(SudokuField& field); 28 }; 29 30 #endif // SUDOKU_GENERATOR_H 31