diff options
| author | Charles <sircharlesaze@gmail.com> | 2020-03-18 21:36:21 +0100 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2020-03-18 21:36:21 +0100 |
| commit | cae4150779c587edcc40b75f04624ab3971bbed6 (patch) | |
| tree | d4d8a749ddcd7fdedc1cb5d3b9265e5df196f9f3 /src/main.cpp | |
| parent | 79ab0bdeedd6e7f97b4c246b4319af5eac545061 (diff) | |
| download | 2048-cae4150779c587edcc40b75f04624ab3971bbed6.tar.gz 2048-cae4150779c587edcc40b75f04624ab3971bbed6.tar.bz2 2048-cae4150779c587edcc40b75f04624ab3971bbed6.zip | |
random spawn
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index 7fe08bf..b0c98a0 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,4 +1,5 @@ #include <iostream> +#include <cstdlib> #include "graphics.hpp" #include "game.hpp" @@ -9,6 +10,7 @@ int main() { + srand(time(NULL)); Game game = Game(GAME_GRID_SIZE); Graphics *graphics = new Graphics(&game, WINDOW_TITLE, WINDOW_WIDTH, WINDOW_HEIGHT); |
