#ifndef CUBE36_H
#define CUBE36_H

#include <QVector>
#include "backtracker.h"

//using namespace Backtrack;
namespace Backtrack
{
	class Cube36 : public Generic<Cube36>
	{
	public:
		class Pin
		{
		public:
			typedef enum {Undefined, Red, Orange, Yellow, Green, Blue, Violet} ColorT;
			Pin() : Col(Undefined), Len(0) {}
			Pin(ColorT c, int l) : Col(c), Len(l) {}
			bool operator== (const Cube36::Pin& b) const;
			bool operator!= (const Cube36::Pin& b) const {return !(*this==b);}

			ColorT Col;
			int Len;
		};

		typedef QVector <Pin> PinVecT;

		Cube36(bool solvable=true);

		Pin pin(int,int) const;
		QString toString(void) const;
		QString pinToString(Pin p) const;
		PinVecT peacesLeft(void) const;
	//backtrackable
		bool solved(void) const;
		QList <Cube36> variants(void) const;

		bool operator == (const Cube36& other) const;

		bool TrackSpecialPins;

	private:
		PinVecT Pins;

	};

}




#endif // CUBE36_H
