From 1fa6e533ce95a0d0bf1171d0b141ecc477e1e31f Mon Sep 17 00:00:00 2001 From: Bernardo Magri Date: Mon, 10 Mar 2025 12:12:22 +0000 Subject: [PATCH] adding comments --- src/minefield.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/minefield.cpp b/src/minefield.cpp index 88e45f7..071f947 100644 --- a/src/minefield.cpp +++ b/src/minefield.cpp @@ -25,6 +25,7 @@ void MineField::timerTick() { timerSignal.emit(m_time); start = std::chrono::system_clock::now(); } + //I should use std::duration to represent the time instead } void MineField::initBombs(int x, int y) { @@ -46,7 +47,7 @@ void MineField::initBombs(int x, int y) { //init the timer to zero and start the timer thread m_time = 0; timerThread = std::thread(&MineField::timerTick, this); - timerThread.detach(); //not sure if this is okay + timerThread.detach(); //not sure if this is okay (better to call join() when I set the condition to stop the thread) } bool MineField::openCell(int x, int y) {