made some extra structs and function

This commit is contained in:
rektdie committed 2025-03-31 01:14:57 +02:00
1 parent c80adecb6e
commit 3fe79ab497
2 files changed
+55 -3

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
#include <random>
#include "datagen.h"
#include "movegen.h"
namespace DATAGEN {
static void PlayRandMoves(Board &board) {
std::random_device dev;
std::mt19937 rng(dev());
for (int count = 0; count < RAND_MOVES; count++) {
MOVEGEN::GenerateMoves<All>(board);
std::uniform_int_distribution<std::mt19937::result_type> dist(0, board.currentMoveIndex);
bool isLegal = board.MakeMove(board.moveList[dist(rng)]);
if (!isLegal) count--;
}
}
void Run() {
}
}