diff options
| author | dawidg81 <dawidgorski.m@gmail.com> | 2026-01-25 11:58:09 +0100 |
|---|---|---|
| committer | dawidg81 <dawidgorski.m@gmail.com> | 2026-01-25 11:58:09 +0100 |
| commit | 4ef50178329718fa8d59e02e705cbba955da6de4 (patch) | |
| tree | 1ecaf12a19b05c2036c887ae4ae96ab6dd8c8a9f /src | |
| parent | 2f3deb949ed2f47b59baf6dc7c127d5529f3b6ce (diff) | |
Added tile randomization
Diffstat (limited to 'src')
| -rw-r--r-- | src/game/.game.cpp.swp | bin | 0 -> 12288 bytes | |||
| -rw-r--r-- | src/game/game.cpp | 7 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/game/.game.cpp.swp b/src/game/.game.cpp.swp Binary files differnew file mode 100644 index 0000000..ed064ef --- /dev/null +++ b/src/game/.game.cpp.swp diff --git a/src/game/game.cpp b/src/game/game.cpp index 4f6ef41..2b5df1f 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -1,3 +1,4 @@ +#include <cstdlib> #include <iostream> #include "globals.hpp" using namespace std; @@ -59,4 +60,10 @@ void game(int diff){ break; } + + for(int i = 0; i < boardHeight; i++){ + for(int j = 0; j < boardWidth; j++){ + board[i][j] = rand() % 1; + } + } } |
