summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp37
1 files changed, 18 insertions, 19 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 5498cf9..3f18423 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3,28 +3,27 @@
using namespace std;
int main(){
+ Game game;
int choice;
- while(!inGame){
- cout << "Welcome to minesweeper 0.1.0\n";
- cout << "\n";
- cout << "Select difficulty:\n"
- "1. Easy\n"
- "2. Medium\n"
- "3. Hard\n"
- "4. Custom\n";
- cout << "Difficulty: ";
- cin >> choice;
+ cout << "Welcome to minesweeper 0.1.0\n";
+ cout << "\n";
+ cout << "Select difficulty:\n"
+ "1. Easy\n"
+ "2. Medium\n"
+ "3. Hard\n"
+ "4. Custom\n";
+ cout << "Difficulty: ";
+ cin >> choice;
- if(choice == 1){
- game(0);
- } else if(choice == 2){
- game(1);
- } else if(choice == 3){
- game(2);
- } else if(choice == 4){
- game(3);
- }
+ if(choice == 1){
+ game.initDiff(0);
+ } else if(choice == 2){
+ game.initDiff(1);
+ } else if(choice == 3){
+ game.initDiff(2);
+ } else if(choice == 4){
+ game.initDiff(3);
}
return 0;