summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordawidg81 <dawidgorski.m@gmail.com>2026-01-25 11:58:09 +0100
committerdawidg81 <dawidgorski.m@gmail.com>2026-01-25 11:58:09 +0100
commit4ef50178329718fa8d59e02e705cbba955da6de4 (patch)
tree1ecaf12a19b05c2036c887ae4ae96ab6dd8c8a9f /src
parent2f3deb949ed2f47b59baf6dc7c127d5529f3b6ce (diff)
Added tile randomization
Diffstat (limited to 'src')
-rw-r--r--src/game/.game.cpp.swpbin0 -> 12288 bytes
-rw-r--r--src/game/game.cpp7
2 files changed, 7 insertions, 0 deletions
diff --git a/src/game/.game.cpp.swp b/src/game/.game.cpp.swp
new file mode 100644
index 0000000..ed064ef
--- /dev/null
+++ b/src/game/.game.cpp.swp
Binary files differ
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;
+ }
+ }
}