aboutsummaryrefslogtreecommitdiff
path: root/src/misc.cpp
blob: 79cf74f21d8d248ef223161df3d3fd2fe2389e8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include "misc.hpp"
#include "moves.hpp"
#include <cstdint>
#include <string_view>

std::string_view engine_info() { return "Mono 1\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;
}