--- queensgui/src/solution.h 2007/07/20 01:22:53 5 +++ queensgui/src/solution.h 2010/04/23 06:04:54 656 @@ -17,37 +17,83 @@ * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ -#ifndef SOLUTION_H -#define SOLUTION_H +#ifndef SOLUTIONINT_H +#define SOLUTIONINT_H +//#include #include "config.h" -/** -@author Torben Nielsen -*/ -class Solution +class Solution { public: - virtual ~Solution() {} + Solution(int size); + + ~Solution(); + + //bool getMatrix(int x, int y); + bool getMatrix(int x, int y) { + return (m_matrix[x] == y); + } + + + //void setMatrix(int x, int y, bool val); + void setMatrix(int x, int y, bool val) { + if (val == true) + m_matrix[x] = y; + else + m_matrix[x] = -1; + } + + + + //bool operator ==(const Solution& sol); + bool operator ==(const Solution& s) + { + const Solution& sol = dynamic_cast(s); + for (int i=0; i