--- queensgui/src/solution.h 2007/07/19 21:34:15 1 +++ queensgui/src/solution.h 2007/07/20 16:58:04 8 @@ -20,7 +20,6 @@ #ifndef SOLUTION_H #define SOLUTION_H -#include "config.h" /** @author Torben Nielsen @@ -28,26 +27,25 @@ class Solution { public: + virtual ~Solution() {} + virtual void rotate90() = 0; + virtual void mirror() = 0; + + virtual Solution* copy() = 0; - // functions - Solution(int size=8); - Solution(const Solution &input); - ~Solution(); - - void set(bool input[MAX_SIZE][MAX_SIZE]); - void rotate90(); - void mirror(); - - bool operator==(const Solution& sol); - bool operator!=(const Solution& sol); + virtual bool operator==(const Solution& sol) = 0; + virtual bool getMatrix(int x, int y) = 0; + virtual void setMatrix(int x, int y, bool val) = 0; int size() {return m_size;}; void setSize(int size) {m_size = size;}; - bool matrix[MAX_SIZE][MAX_SIZE]; + void print(); + void print(bool debug, int row, int col); protected: int m_size; + Solution& operator=(Solution& s); }; #endif