1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-05-04 02:29:35 +00:00
BadFish/src/syzygy/tbprobe.h
Marco Costalba 9e24e68419 Add struct destructors
Avoid explicitly freeing the objects.

Because d'tor involves file unmapping, some
care must be taken to avoid accidentaly destroy
the object (even temporarly), for instance when
reordering the list.

As a side effect, we can now restore the original
main.cpp, fully in sync with master branch.
2016-04-26 09:13:27 +02:00

25 lines
592 B
C++

#ifndef TBPROBE_H
#define TBPROBE_H
#include "../search.h"
namespace Tablebases {
enum WDLScore {
WDLHardLoss = -2, // Loss
WDLSoftLoss = -1, // Loss, but draw under 50-move rule
WDLDraw = 0, // Draw
WDLSoftWin = 1, // Win, but draw under 50-move rule
WDLHardWin = 2, // Win
};
extern int MaxCardinality;
void init(const std::string& paths);
WDLScore probe_wdl(Position& pos, int* success);
bool root_probe(Position& pos, Search::RootMoves& rootMoves, Value& score);
bool root_probe_wdl(Position& pos, Search::RootMoves& rootMoves, Value& score);
}
#endif