28 |
class Solution |
class Solution |
29 |
{ |
{ |
30 |
public: |
public: |
31 |
|
virtual ~Solution() {} |
32 |
|
|
33 |
|
virtual void rotate90() = 0; |
34 |
|
virtual void mirror() = 0; |
35 |
|
|
36 |
|
virtual Solution* copy() = 0; |
37 |
|
|
38 |
// functions |
virtual bool operator==(const Solution& sol) = 0; |
39 |
Solution(int size=8); |
//virtual bool operator!=(const Solution& sol) = 0; |
40 |
Solution(const Solution &input); |
virtual bool getMatrix(int x, int y) = 0; |
41 |
~Solution(); |
virtual void setMatrix(int x, int y, bool val) = 0; |
|
|
|
|
void set(bool input[MAX_SIZE][MAX_SIZE]); |
|
|
void rotate90(); |
|
|
void mirror(); |
|
|
|
|
|
bool operator==(const Solution& sol); |
|
|
bool operator!=(const Solution& sol); |
|
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 |
bool matrix[MAX_SIZE][MAX_SIZE]; |
void print(); |
47 |
|
void print(bool debug, int row, int col); |
48 |
protected: |
protected: |
49 |
int m_size; |
int m_size; |
50 |
|
Solution& operator=(Solution& s); |
51 |
}; |
}; |
52 |
|
|
53 |
#endif |
#endif |