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 10
10
* biggest table size and hardest mode. The bigger the size, **the more letters are available**.
11
11
*
12
12
* @author [David Leal](https://github.com/Panquesito7)
13
- */
13
+ */
14
14
15
15
#include < iostream> // / for IO operations
16
16
#include < ctime> // / for std::time()
25
25
#include < unistd.h> // / for sleep
26
26
#endif
27
27
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
-
41
28
/* *
42
29
* @namespace
43
30
* @brief (Mini)game implementations.
@@ -95,7 +82,7 @@ void init(std::vector<T> *table) {
95
82
pairs.push_back (letter);
96
83
}
97
84
98
- SHUFFLE (pairs.begin (), pairs.end ());
85
+ std::random_shuffle (pairs.begin (), pairs.end ());
99
86
100
87
for (int i = 0 ; i < (*table).size (); i++) {
101
88
(*table)[i] = pairs[i];
You can’t perform that action at this time.
0 commit comments