joinBoards method
- BasicShape shape
It copies the cross from the parameter to the global variable.
Args: cross (Cross): The cross that will be joined to the current cross.
Returns: A boolean value.
Implementation
bool joinBoards(BasicShape shape) {
for (int i = 0; i < 6; i++) {
for (int j = 0; j < 6; j++) {
if (shape.grid[i][j] != 0) {
_shape.grid[i][j] = shape.grid[i][j];
}
}
}
return true;
}