Show
Ignore:
Timestamp:
10/09/06 22:00:12 (2 years ago)
Author:
ug
Message:

Improved GameList? interface (e.g. for different board sizes). Added Makefile.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 06/libkombilo/testhash.py

    r194 r195  
    66from libkombilo import * 
    77 
    8 gl = GameList('t1.db', '', '[[PW]] - [[PB]] ([[winner]]), [[filename]]', ALGO_FINALPOS | ALGO_MOVELIST, 19
     8gl = GameList('t1.db', '', '[[PW]] - [[PB]] ([[winner]]), [[filename]]'
    99print gl.size(), 'games in the database' 
    1010 
     
    4444print 'This search took %.2f seconds.' % (end - start) 
    4545 
     46print 'Search again without using the hashing algorithm.' 
     47gl.reset() 
     48print gl.size(), 'games in the database.' 
     49so = SearchOptions() 
     50so.algos = ALGO_MOVELIST | ALGO_FINALPOS 
     51start = time.time() 
     52gl.search(p, so) 
     53end = time.time() 
     54print gl.size(), 'games, ', gl.numHits(), 'hits.' 
     55print 'This search took %.2f seconds.' % (end - start) 
     56