summary refs log tree commit diff stats
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp27
1 files changed, 10 insertions, 17 deletions
diff --git a/src/main.cpp b/src/main.cpp index 4157350..d59d0f9 100644 --- a/src/main.cpp +++ b/src/main.cpp
@@ -1,25 +1,18 @@
1#include <ctime> 1#include <random>
2#include <list>
3#include "renderer.h"
4#include <cstdlib>
5#include "game.h"
6#include "muxer.h" 2#include "muxer.h"
3#include "game.h"
7 4
8int main() 5int main()
9{ 6{
10 srand(time(NULL)); 7 std::random_device randomDevice;
11 8 std::mt19937 rng(randomDevice());
12 GLFWwindow* window = initRenderer(); 9
13 initMuxer(); 10 initMuxer();
14 11
15 // Put this in a block so game goes out of scope before we destroy the renderer 12 Game game(rng);
16 { 13 game.execute();
17 Game game {"res/maps.xml"}; 14
18 game.execute(window);
19 }
20
21 destroyMuxer(); 15 destroyMuxer();
22 destroyRenderer(); 16
23
24 return 0; 17 return 0;
25} 18}