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

std::string version = "1";
std::string name = "Mono";

std::string engine_version() { return name + " " + version; };

std::string engine_info() { return engine_version() + "\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;
}