/[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 8 by torben, Fri Jul 20 16:58:04 2007 UTC
# Line 20  Line 20 
20  #ifndef SOLUTION_H  #ifndef SOLUTION_H
21  #define SOLUTION_H  #define SOLUTION_H
22    
 #include "config.h"  
23    
24  /**  /**
25  @author Torben Nielsen  @author Torben Nielsen
# Line 28  Line 27 
27  class Solution  class Solution
28  {  {
29  public:  public:
30            virtual ~Solution() {}
31    
32            virtual void rotate90() = 0;
33          // 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();  
34                    
35          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);  
36    
37            virtual bool operator==(const Solution& sol) = 0;
38            virtual bool getMatrix(int x, int y) = 0;
39            virtual void setMatrix(int x, int y, bool val) = 0;
40    
41          int size() {return m_size;};          int size() {return m_size;};
42          void setSize(int size) {m_size = size;};          void setSize(int size) {m_size = size;};
43                    
44            void print();
45            void print(bool debug, int row, int col);
46  protected:  protected:
         bool m_matrix[MAX_SIZE][MAX_SIZE];  
47          int m_size;          int m_size;
48            Solution& operator=(Solution& s);
49  };  };
50    
51  #endif  #endif

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

  ViewVC Help
Powered by ViewVC 1.1.20