void Tile::setTextureSolved(bool textureSolved) { if (textureSolved != _textureSolved) { _textureSolved = textureSolved; if (_subtiles != NULL) { const int subtilesSize = _subtiles->size(); for (int i = 0; i < subtilesSize; i++) { Tile* subtile = _subtiles->at(i); subtile->ancestorTexturedSolvedChanged(this, _textureSolved); } } } }
void Tile::ancestorTexturedSolvedChanged(Tile* ancestor, bool textureSolved) { if (textureSolved && isTextureSolved()) { return; } if (_texturizer != NULL) { _texturizer->ancestorTexturedSolvedChanged(this, ancestor, textureSolved); } if (_subtiles != NULL) { const int subtilesSize = _subtiles->size(); for (int i = 0; i < subtilesSize; i++) { Tile* subtile = _subtiles->at(i); subtile->ancestorTexturedSolvedChanged(ancestor, textureSolved); } } }