summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authordawidg81 <dawidgorski.m@gmail.com>2026-02-01 22:02:24 +0100
committerdawidg81 <dawidgorski.m@gmail.com>2026-02-01 22:02:24 +0100
commita31c98bc0aed77a3efbbd57a051f4af8e24824df (patch)
tree453c915542cda666a7a33017982cc2358137d2b7 /src/main.cpp
parent2b649745227a4dde5f2d3256a0b5f8fc9927e3d8 (diff)
Starting handling game loop
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 88b8ffa..ef12c62 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -4,6 +4,7 @@ using namespace std;
int main(){
Game game;
+ bool inGame = false;
int choice;
cout << "Welcome to minesweeper 0.1.0\n";
@@ -18,12 +19,21 @@ int main(){
if(choice == 1){
game.initDiff(0);
+ inGame = true;
} else if(choice == 2){
game.initDiff(1);
+ inGame = true;
} else if(choice == 3){
game.initDiff(2);
+ inGame = true;
} else if(choice == 4){
game.editDiff();
+ inGame = true;
+ }
+
+ while(inGame){
+ game.initBoard();
+ game.displayBoard();
}
return 0;