adding comments

This commit is contained in:
Bernardo Magri
2025-03-10 12:16:37 +00:00
parent 762f233f99
commit 2028218879

View File

@@ -119,6 +119,7 @@ void MineField::setOpenCell(int x, int y) {
m_cells.at(x + y * m_rows)->isCleared = true; m_cells.at(x + y * m_rows)->isCleared = true;
openCellSignal.emit(x, y); openCellSignal.emit(x, y);
if((++m_openCells == (m_cols * m_rows - m_totalMines)) && (m_exploded == false)) { if((++m_openCells == (m_cols * m_rows - m_totalMines)) && (m_exploded == false)) {
m_gameWon = true;
gameWonSignal.emit(); gameWonSignal.emit();
} }
} }