Example #1
0
 public PostMoveState(Board postMoveBoard, ushort moveValue, string san)
 {
     BoardState     = postMoveBoard;
     MoveValue      = moveValue;
     San            = san;
     BoardStateHash = PolyglotHelpers.GetBoardStateHash(postMoveBoard);
 }
Example #2
0
 /// <summary>
 ///     To construct options to filter games by FEN.
 /// </summary>
 /// <param name="fenPositionFilter">Complete FEN to filter on</param>
 /// <param name="plySearchLimit">
 ///     Number of ply (half-moves) to search before determining game does not meet filter
 ///     specifications. If null, this will be set using the full-move count in the FEN
 /// </param>
 /// <param name="updateProgressFrequency">Parse this number of games before calling update event</param>
 /// <param name="maxGameCount">Parse at the maximum this many games</param>
 /// <param name="maxPlyCount">Only parse this many ply (half-moves) of each game</param>
 /// <param name="ignoreVariations">true to not parse variations</param>
 public PGNParserOptions(string fenPositionFilter, int?plySearchLimit = null, int updateProgressFrequency = 100,
                         int?maxGameCount = null, int?maxPlyCount = null, bool ignoreVariations = false)
     : this(updateProgressFrequency, maxGameCount, maxPlyCount, ignoreVariations)
 {
     FenFilter      = fenPositionFilter;
     FilterPlyLimit = plySearchLimit;
     BoardStateHash = PolyglotHelpers.GetBoardStateHash(fenPositionFilter);
 }
Example #3
0
        public void TestHash(string fen, ulong expectedHash, string desc)
        {
            var result = PolyglotHelpers.GetBoardStateHash(fen);

            Assert.AreEqual(expectedHash, result, desc);
        }