Creating the timer functions

This commit is contained in:
Bernardo Magri
2025-03-11 09:53:44 +00:00
parent efc523c0c9
commit 8c1cf20228
2 changed files with 24 additions and 7 deletions

View File

@@ -26,12 +26,15 @@ class MineField {
int m_openCells;
bool m_exploded;
bool m_gameWon;
bool m_timerRunning;
size_t m_time;
std::thread timerThread;
std::thread m_timerThread;
void computeBombsNearby(int x, int y);
void openNeighboorhood(int x, int y);
void setOpenCell(int x, int y);
void timerTick();
void startTimer();
void stopTimer();
public:
MineField(int cols, int rows, int mines);