summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordawidg81 <dawidgorski.m@gmail.com>2026-02-03 15:03:18 +0100
committerdawidg81 <dawidgorski.m@gmail.com>2026-02-03 15:03:18 +0100
commitf9f1a41a404d9b6d0da20d0d61eebb752ddb5896 (patch)
tree5f3524d3b13e4158c46e1003170e449f3ec4ebe4 /src
parent0b47e6d00261d20d27ff10f5ee3d3e5d1660c766 (diff)
removed flag feature; now starting from v0.2.0
Diffstat (limited to 'src')
-rw-r--r--src/Game.cpp12
-rw-r--r--src/Game.obin0 -> 15688 bytes
-rw-r--r--src/main.cpp2
3 files changed, 7 insertions, 7 deletions
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
--- /dev/null
+++ b/src/Game.o
Binary files 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"