diff options
Diffstat (limited to 'src/misc.cpp')
| -rw-r--r-- | src/misc.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/misc.cpp b/src/misc.cpp index 8527fdc..db9240c 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -1,4 +1,6 @@ #include "misc.hpp" +#include "moves.hpp" +#include <cstdint> #include <string> std::string version = "0"; @@ -6,3 +8,17 @@ std::string version = "0"; std::string engine_version() { return "Mono " + version; }; std::string engine_info() { return engine_version() + " by Adam " + "\n"; } + +uint64_t MoveGenTest(int depth, Game *g) { + uint64_t num = 0; + if (depth <= 0) { + return 1; + } + auto moves = GetLegalMoves(g); + for (auto move : moves) { + UndoMove undo = MakeMove(move, g); + num += MoveGenTest(depth - 1, g); + UnMakeMove(undo, g); + } + return num; +} |
