-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
33 lines (29 loc) · 839 Bytes
/
main.cpp
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
#include <algorithm>
#include <iostream>
#include <thread>
#include <string>
#include "Game.cpp"
using namespace std;
int main() {
string quest;
cout.setf(ios::unitbuf);
cout << "Booting up..." << endl;
Setup();
cout << "Copyright Yan-Luca L." << endl;
cout << "Walls? y/n (default: n)" << endl;
cin >> quest;
transform(quest.begin(), quest.end(), quest.begin(), ::tolower );
if (quest == "y")
walls = true;
else
walls = false;
cout << "W = Up; A = Left; S = Down; D = Right; X = Game Over; Game start in 1Second" << endl;
Sleep(1000);
thread draw_thread([] { return Draw(); });
thread input_thread([] { return Input(); });
thread logic_thread([] { return Logic(); });
draw_thread.join();
input_thread.join();
logic_thread.join();
return 0;
}