I previously asked how to use polyglot in c# with a chess engine. My question then was not accurate. What property(ies) of the bin file object do I need to do the following:
I will parse a FEN string, then, I will access a property of this bin file that will allow me to generate a FEN string that's hopefully linked to a move, whether this move is in a PGN string of a game, or saved as a specific data struct.
Then I will compare my parsed string with such FEN string obtained by accessing a property of the bin file object.
Then, when I find a match, I will use another method to obtain the next immediate move, which is the one the computer should do, according to the game from which the move was obtained after finding a FEN matching the one I parsed in the first place.
So, I guess a pseudo code would look like:
string extractedMove;
string parsedFEN = "...";
object bookBytes = File.Read(pathofthebookfile);
string GetFENOutOfBook (string FENvalue)
{
return bookBytes.Find(FENproperty/Fenkey => FENvalue);
}
public void GetMove ()
{
extractedMove = bookBytes.moves[GetFENOutOfBook(parsedFEN)].ToString();
}
I just need to know what properties I need to work with of the polyglot book bin file so I can create the logic to extract the move.