예제 #1
0
파일: Game.cs 프로젝트: vgichar/shah
        /// <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);
            }
        }