-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
39 lines (27 loc) · 775 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
34
35
36
37
38
39
#include "Game.h"
#include "raylib.h"
#include "Settings.h"
int main(void)
{
Game game{ settings::screenWidth,
settings::screenHeight,
settings::fps,"Tetris Raylib" };
//Game game2 = game; // Coping with default ctor means that dtor will clean same memory both times. That causes crash
while (!game.GameShouldClose())
{
game.Tick();
}
return 0;
}
/* Tutorial #1 : Why we need rule of 5
int main(void)
{
const int screenWidth = 800;
const int screenHeight = 450;
Game game{ screenWidth, screenHeight, "Tetris Raylib" };
{
Game game2 = game; // Coping with default ctor means that dtor will clean same memory both times. That causes crash
}
return 0;
}
*/