85 |
return true; |
return true; |
86 |
} |
} |
87 |
|
|
|
bool SolutionMatrix::operator!=(const Solution& s) |
|
|
{ |
|
|
const SolutionMatrix& sol = dynamic_cast<const SolutionMatrix&>(s); |
|
|
|
|
|
int matchcount = 0; |
|
|
for (int i=0; i<m_size; i++) |
|
|
for (int j=0; j<m_size; j++) |
|
|
if (m_matrix[i][j] == sol.m_matrix[i][j]) |
|
|
matchcount++; |
|
|
if (matchcount == (m_size*2) ) |
|
|
return false; |
|
|
else |
|
|
return true; |
|
|
} |
|
|
|
|
88 |
bool SolutionMatrix::getMatrix(int x, int y) { |
bool SolutionMatrix::getMatrix(int x, int y) { |
89 |
return m_matrix[x][y]; |
return m_matrix[x][y]; |
90 |
} |
} |