Exemple #1
0
        /// <summary>
        /// Removes the current board hash from history.
        /// </summary>
        private void RemoveHistoryHash()
        {
            int hash = currentBoard.GetHashCode();
            int freq = historyHashes[hash];

            // if the frequency is more than 1 decrement it, otherwise remove the hash
            if (freq > 1)
            {
                historyHashes[hash] = freq - 1;
            }
            else
            {
                historyHashes.Remove(hash);
            }
        }