コード例 #1
0
 public void Store(TranspositionTableEntry entry)
 {
     if (table[(uint)entry.HashKey % table.Length] != null && entry.HashKey != table[(uint)entry.HashKey % table.Length].HashKey)
     {
         Debug.WriteLine("Hash Store Conflict");
     }
     table[(uint)entry.HashKey % table.Length] = entry;
 }
コード例 #2
0
        public TranspositionTableEntry Retrieve(int hashkey)
        {
            TranspositionTableEntry entry = table[(uint)hashkey % table.Length];

            if (entry != null && entry.HashKey == hashkey)
            {
                return(entry);
            }
            else if (entry != null)
            {
                Debug.WriteLine("Hash Retrieve Conflict");
            }
            return(null);
        }