From f9f1a41a404d9b6d0da20d0d61eebb752ddb5896 Mon Sep 17 00:00:00 2001 From: dawidg81 Date: Tue, 3 Feb 2026 15:03:18 +0100 Subject: removed flag feature; now starting from v0.2.0 --- minesweeper | Bin 53712 -> 53728 bytes src/Game.cpp | 12 ++++++------ src/Game.o | Bin 0 -> 15688 bytes src/main.cpp | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 src/Game.o diff --git a/minesweeper b/minesweeper index 4d37823..07b9dd0 100755 Binary files a/minesweeper and b/minesweeper differ diff --git a/src/Game.cpp b/src/Game.cpp index 01bff24..c545530 100644 --- a/src/Game.cpp +++ b/src/Game.cpp @@ -34,7 +34,7 @@ void Game::initBoard(){ bombMap[y][x] = false; revealed[y][x] = false; tileMap[y][x] = 0; - flag[y][x] = false; + // flag[y][x] = false; } } @@ -54,7 +54,7 @@ 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; + // if(!flag[y][x]) continue; else tileMap[y][x] = 10; int bombs = bombCheck(x, y); @@ -121,7 +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 if(tileMap[y][x] == 10) putchar('F'); else putchar('0' + tileMap[y][x] - 1); } putchar('\n'); @@ -189,7 +189,7 @@ void Game::input(){ } } - if(cmd == "f"){ - flag[y][x] = true; - } + //if(cmd == "f"){ + // flag[y][x] = true; + //} } diff --git a/src/Game.o b/src/Game.o new file mode 100644 index 0000000..a9ed709 Binary files /dev/null and b/src/Game.o differ diff --git a/src/main.cpp b/src/main.cpp index 9f70dcd..afea063 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -7,7 +7,7 @@ int main(){ game.inGame = false; int choice; - cout << "Welcome to minesweeper 0.1.0\n"; + cout << "Welcome to minesweeper v0.2.0\n"; cout << "\n"; cout << "Select difficulty:\n" "1. Easy\n" -- cgit v1.2.3