File tree Expand file tree Collapse file tree 1 file changed +2
-15
lines changed Expand file tree Collapse file tree 1 file changed +2
-15
lines changed Original file line number Diff line number Diff line change 1010 * biggest table size and hardest mode. The bigger the size, **the more letters are available**.
1111 *
1212 * @author [David Leal](https://github.com/Panquesito7)
13- */
13+ */
1414
1515#include < iostream> // / for IO operations
1616#include < ctime> // / for std::time()
2525#include < unistd.h> // / for sleep
2626#endif
2727
28- // `std::random_shuffle` was deprecated in C++14. To keep support with most compilers, we need to check the C++ version.
29- #if __cplusplus >= 201402L
30- template <typename T>
31- constexpr auto SHUFFLE (T a, T b) -> void {
32- return std::shuffle (a, b, std::mt19937 (std::random_device ()()));
33- }
34- #else
35- template <typename T>
36- constexpr auto SHUFFLE (T a, T b) -> void {
37- return std::random_shuffle (a, b);
38- }
39- #endif
40-
4128/* *
4229 * @namespace
4330 * @brief (Mini)game implementations.
@@ -95,7 +82,7 @@ void init(std::vector<T> *table) {
9582 pairs.push_back (letter);
9683 }
9784
98- SHUFFLE (pairs.begin (), pairs.end ());
85+ std::random_shuffle (pairs.begin (), pairs.end ());
9986
10087 for (int i = 0 ; i < (*table).size (); i++) {
10188 (*table)[i] = pairs[i];
You can’t perform that action at this time.
0 commit comments