#ifndef QUEENS_H
#define QUEENS_H

#include <QBitArray>
#include "backtracker.h"
using namespace Backtrack;

class Queens : public Generic<Queens>
{
public:
	Queens(ushort size=8);

	virtual bool solved(void) const;
	virtual ListT variants(void) const;
	virtual QString toString(bool cr) const;
	virtual QString toString() const {return "\n"+toString(true);}

	int hashSize(void) const {return Hash.size();}
private:
	typedef enum {Row, Column, Diagonal} FieldsT;
	static void setFields(QBitArray&, FieldsT, ushort);
	//static const quint64 One;
	int Size;
	QBitArray Hash;
};

#endif // QUEENS_H
