40 lines
703 B
C
40 lines
703 B
C
|
#ifndef LIBQCROSS_CNONOGRAMSOLVER_H
|
||
|
#define LIBQCROSS_CNONOGRAMSOLVER_H
|
||
|
|
||
|
#include <QObject>
|
||
|
|
||
|
namespace libqcross {
|
||
|
class CNonogram;
|
||
|
|
||
|
class CNonogramSolver : public QObject {
|
||
|
Q_OBJECT
|
||
|
public:
|
||
|
CNonogramSolver(QObject * parent = 0);
|
||
|
~CNonogramSolver();
|
||
|
|
||
|
void setNonogram(CNonogram * nonogram) { m_Nonogram = nonogram; }
|
||
|
bool solve();
|
||
|
signals:
|
||
|
void markRequested(int x, int y, int type);
|
||
|
protected:
|
||
|
// struct Range {
|
||
|
// int left;
|
||
|
// int right;
|
||
|
//
|
||
|
// Range() : left(-1), right(-1) {}
|
||
|
// bool isNULL() { return left == -1; }
|
||
|
// };
|
||
|
|
||
|
CNonogram * m_Nonogram;
|
||
|
|
||
|
int ** m_OverlayData;
|
||
|
|
||
|
void cleanup();
|
||
|
|
||
|
bool solveRow(int y);
|
||
|
bool solveColumn(int x);
|
||
|
};
|
||
|
}
|
||
|
|
||
|
#endif
|