From cd14289702fd22ed65536dccd61fd9569198b644 Mon Sep 17 00:00:00 2001 From: dawidg81 Date: Tue, 3 Feb 2026 14:52:35 +0100 Subject: Revoked placing flags feature --- src/Game.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/Game.cpp') diff --git a/src/Game.cpp b/src/Game.cpp index 327e179..e08ab24 100644 --- a/src/Game.cpp +++ b/src/Game.cpp @@ -34,6 +34,7 @@ void Game::initBoard(){ bombMap[y][x] = false; revealed[y][x] = false; tileMap[y][x] = 0; + flag[y][x] = false; } } @@ -53,6 +54,8 @@ void Game::updateBoard(){ for(int y=0; y < boardHeight; y++){ for(int x=0; x < boardWidth; x++){ if(!revealed[y][x]) continue; + if(!flag[y][x]) continue; + else tileMap[y][x] = 10; int bombs = bombCheck(x, y); tileMap[y][x] = bombs == 0 ? 1 : bombs + 1; @@ -118,6 +121,7 @@ void Game::displayBoard() { for(int x = 0; x < boardWidth; x++){ if(tileMap[y][x] == 0) putchar('#'); else if(tileMap[y][x] == 1) putchar('.'); + else if(tileMap[y][x] == 10) putchar('F'); else putchar('0' + tileMap[y][x] - 1); } putchar('\n'); @@ -184,4 +188,6 @@ void Game::input(){ } } } + + if(cmd == "f") } -- cgit v1.2.3