/[projects]/queensgui/src/solution.h
ViewVC logotype

Diff of /queensgui/src/solution.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 4 by torben, Thu Jul 19 23:44:01 2007 UTC revision 5 by torben, Fri Jul 20 01:22:53 2007 UTC
# Line 28  Line 28 
28  class Solution  class Solution
29  {  {
30  public:  public:
31            virtual ~Solution() {}
32    
33            virtual void rotate90() = 0;
34          // functions          virtual void mirror() = 0;
         Solution(int size=8);  
         Solution(const Solution &input);  
         ~Solution();  
   
         void set(bool input[MAX_SIZE][MAX_SIZE]);  
         void rotate90();  
         void mirror();  
35                    
36          Solution* copy();          virtual Solution* copy() = 0;
   
         bool operator==(const Solution& sol);  
         bool operator!=(const Solution& sol);  
         bool getMatrix(int x, int y);  
         void setMatrix(int x, int y, bool val);  
37    
38            virtual bool operator==(const Solution& sol) = 0;
39            //virtual bool operator!=(const Solution& sol) = 0;
40            virtual bool getMatrix(int x, int y) = 0;
41            virtual void setMatrix(int x, int y, bool val) = 0;
42    
43          int size() {return m_size;};          int size() {return m_size;};
44          void setSize(int size) {m_size = size;};          void setSize(int size) {m_size = size;};
45                    
46            void print();
47            void print(bool debug, int row, int col);
48  protected:  protected:
         bool m_matrix[MAX_SIZE][MAX_SIZE];  
49          int m_size;          int m_size;
50            Solution& operator=(Solution& s);
51  };  };
52    
53  #endif  #endif

Legend:
Removed from v.4  
changed lines
  Added in v.5

  ViewVC Help
Powered by ViewVC 1.1.20