-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
36 lines (36 loc) · 864 Bytes
/
Copy pathmain.cpp
File metadata and controls
36 lines (36 loc) · 864 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include <SFML/Graphics.hpp>
#include "game.h"
#include <fstream>
using namespace std;
int main()
{
ifstream file("files/config.cfg");
ifstream file2("files/leaderboard.txt");
string temp1;
string temp2;
string temp3;
int columns;
int rows;
int width;
int height;
int tiles;
int mines;
getline(file,temp1);
getline(file,temp2);
getline(file,temp3);
columns=stoi(temp1);
rows=stoi(temp2);
width = stoi(temp1)*32;
height = stoi(temp2)*32+100;
mines=stoi(temp3);
tiles=stoi(temp1)*stoi(temp2);
welcomeWindow welcome(width,height);
if(welcome.open==true){
gameWindow game(columns,rows,width,height,tiles,mines);
// if(game.leaderBool==true){
// cout << "hi" << endl;
// leaderboardWindow leader(width,height);
// }
}
return 0;
}