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 |
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 |