diff options
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/main.cpp b/src/main.cpp index c4ef817..7fe08bf 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,17 +1,21 @@ #include <iostream> -#include <SDL2/SDL.h> #include "graphics.hpp" +#include "game.hpp" #define WINDOW_TITLE "2048" -#define WINDOW_WIDTH 640 +#define WINDOW_WIDTH 480 #define WINDOW_HEIGHT 480 +#define GAME_GRID_SIZE 4 int main() { - Graphics g = Graphics(WINDOW_TITLE, WINDOW_WIDTH, WINDOW_HEIGHT); + Game game = Game(GAME_GRID_SIZE); + Graphics *graphics = new Graphics(&game, WINDOW_TITLE, WINDOW_WIDTH, WINDOW_HEIGHT); - while (g.isRunning()) - g.update(); + while (graphics->isRunning()) + graphics->update(); + + delete graphics; return 0; } |
