#ifndef CHESS_ENGINE_SEARCH_HPP #define CHESS_ENGINE_SEARCH_HPP #include "PrincipalVariation.hpp" #include "Board.hpp" #include #include namespace Search { const int kNegInfinity = std::numeric_limits::min(); struct Node { explicit Node(const Move move) : move(move) { } Node(Node &node) : move(node.move) { next = std::move(node.next); value = node.value + 10; } std::unique_ptr next; Move move; int value = kNegInfinity; }; struct RootNode { std::unique_ptr child; Board board; int value = kNegInfinity; }; int search(Node *node, const Board &board, unsigned depth); PrincipalVariation start(const Board &board); int evaluate(const Board &board); } #endif //CHESS_ENGINE_SEARCH_HPP