2 files + 6 − 1 Side-by-side Compare changes Side-by-side Inline Show whitespace changes Files 2 .DS_Store (6 KiB) File changed.No diff preview for this file type. View original file View changed file applicationQT2048/gamemanager.cpp +6 −1 Original line number Original line Diff line number Diff line Loading @@ -243,7 +243,12 @@ void GameManager::addRandomElement() { int col = emptyCells[randomIndex].second; int col = emptyCells[randomIndex].second; // Placer un '2' dans cette case // Placer un '2' dans cette case int randValue = std::rand() % 100; if (randValue < 75) { grid[row][col] = 2; grid[row][col] = 2; } else { grid[row][col] = 4; }; } } } } Loading
.DS_Store (6 KiB) File changed.No diff preview for this file type. View original file View changed file
applicationQT2048/gamemanager.cpp +6 −1 Original line number Original line Diff line number Diff line Loading @@ -243,7 +243,12 @@ void GameManager::addRandomElement() { int col = emptyCells[randomIndex].second; int col = emptyCells[randomIndex].second; // Placer un '2' dans cette case // Placer un '2' dans cette case int randValue = std::rand() % 100; if (randValue < 75) { grid[row][col] = 2; grid[row][col] = 2; } else { grid[row][col] = 4; }; } } } } Loading