File tree 5 files changed +8
-8
lines changed
5 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 6
6
7
7
#include < core/logger/logger.hpp>
8
8
9
- namespace fastchess ::util:: random {
9
+ namespace fastchess ::random {
10
10
inline std::mt19937_64 mersenne_rand;
11
11
12
12
inline uint64_t random_uint64 () {
@@ -21,4 +21,4 @@ inline void seed(uint64_t seed) {
21
21
LOG_INFO (" Setting seed to: {}" , seed);
22
22
mersenne_rand.seed (seed);
23
23
}
24
- } // namespace fastchess::util:: random
24
+ } // namespace fastchess::random
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ struct Openings {
20
20
template <typename T>
21
21
static void shuffle (T& vec) {
22
22
for (std::size_t i = 0 ; i + 2 <= vec.size (); i++) {
23
- auto rand = util:: random::mersenne_rand ();
23
+ auto rand = random ::mersenne_rand ();
24
24
std::size_t j = i + (rand % (vec.size () - i));
25
25
std::swap (vec[i], vec[j]);
26
26
}
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ void TournamentManager::start(const cli::Args& args) {
38
38
39
39
LOG_INFO (" {}" , cli::OptionsParser::Version);
40
40
41
- util:: random::seed (config::TournamentConfig->seed );
41
+ random ::seed (config::TournamentConfig->seed );
42
42
43
43
if (config::TournamentConfig->tb_adjudication .enabled ) {
44
44
LOG_INFO (" Loading Syzygy tablebases..." );
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ struct Tournament {
53
53
bool report_penta = true ;
54
54
#endif
55
55
56
- uint64_t seed = util:: random::random_uint64();
56
+ uint64_t seed = random::random_uint64();
57
57
58
58
int scoreinterval = 1 ;
59
59
Original file line number Diff line number Diff line change @@ -167,7 +167,7 @@ TEST_SUITE("Opening Book Test") {
167
167
tournament.opening .start = 3256 ;
168
168
tournament.seed = 123456789 ;
169
169
170
- util:: random::seed (tournament.seed );
170
+ random ::seed (tournament.seed );
171
171
172
172
auto book = book::OpeningBook (tournament);
173
173
auto id = book.fetchId ();
@@ -192,7 +192,7 @@ TEST_SUITE("Opening Book Test") {
192
192
tournament.opening .start = 3256 ;
193
193
tournament.seed = 123456789 ;
194
194
195
- util:: random::seed (tournament.seed );
195
+ random ::seed (tournament.seed );
196
196
197
197
auto book = book::OpeningBook (tournament);
198
198
auto id = book.fetchId ();
@@ -223,7 +223,7 @@ TEST_SUITE("Opening Book Test") {
223
223
tournament.opening .start = 3256 ;
224
224
tournament.seed = 123456789 ;
225
225
226
- util:: random::seed (tournament.seed );
226
+ random ::seed (tournament.seed );
227
227
228
228
auto book = book::OpeningBook (tournament);
229
229
auto id = book.fetchId ();
You can’t perform that action at this time.
0 commit comments