/[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 1 by torben, Thu Jul 19 21:34:15 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            virtual void mirror() = 0;
34            
35            virtual Solution* copy() = 0;
36    
37          // functions          virtual bool operator==(const Solution& sol) = 0;
38          Solution(int size=8);          virtual bool getMatrix(int x, int y) = 0;
39          Solution(const Solution &input);          virtual void setMatrix(int x, int y, bool val) = 0;
         ~Solution();  
   
         void set(bool input[MAX_SIZE][MAX_SIZE]);  
         void rotate90();  
         void mirror();  
   
         bool operator==(const Solution& sol);  
         bool operator!=(const Solution& sol);  
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          bool matrix[MAX_SIZE][MAX_SIZE];          void print();
45            void print(bool debug, int row, int col);
46  protected:  protected:
47          int m_size;          int m_size;
48            Solution& operator=(Solution& s);
49  };  };
50    
51  #endif  #endif

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

  ViewVC Help
Powered by ViewVC 1.1.20