Revision f9980f6a
Added by Leszek Koltunski over 1 year ago
src/main/java/org/distorted/objectlib/tablebases/TablebasesAbstract.java | ||
---|---|---|
98 | 98 |
{ |
99 | 99 |
this(); |
100 | 100 |
|
101 |
mInitialized = true; |
|
101 | 102 |
InputStream stream = res.openRawResource(resource); |
102 | 103 |
ByteArrayOutputStream buffer = new ByteArrayOutputStream(); |
103 | 104 |
|
... | ... | |
275 | 276 |
mTablebase = new Tablebase(mSize); |
276 | 277 |
mTablebase.insertUnpacked(0,(byte)0); |
277 | 278 |
|
278 |
int numInserted; |
|
279 |
int numInserted, totalInserted=1;
|
|
279 | 280 |
byte insertingLevel = 0; |
280 | 281 |
|
281 | 282 |
android.util.Log.e("D", "creating tablebase of size "+mSize); |
... | ... | |
291 | 292 |
} |
292 | 293 |
|
293 | 294 |
insertingLevel++; |
294 |
|
|
295 |
totalInserted += numInserted; |
|
295 | 296 |
android.util.Log.e("D", "inserted "+numInserted+" positions at level "+insertingLevel); |
296 | 297 |
} |
297 | 298 |
while( numInserted>0 ); |
298 | 299 |
|
300 |
android.util.Log.e("D", "total Inserted: "+totalInserted); |
|
299 | 301 |
android.util.Log.e("D", "packing..."); |
300 | 302 |
mTablebase.pack(); |
301 | 303 |
android.util.Log.e("D", "all done"); |
... | ... | |
430 | 432 |
|
431 | 433 |
if( !found ) |
432 | 434 |
{ |
433 |
// error, no move found which would move us closer to a solution
|
|
435 |
android.util.Log.e("D", "solution error: no move found!");
|
|
434 | 436 |
return null; |
435 | 437 |
} |
436 | 438 |
} |
... | ... | |
503 | 505 |
|
504 | 506 |
if( !found ) |
505 | 507 |
{ |
506 |
// error, no move found which would move us closer to a solution
|
|
508 |
android.util.Log.e("D", "scramble error: no move found!");
|
|
507 | 509 |
return null; |
508 | 510 |
} |
509 | 511 |
} |
Also available in: Unified diff
Ivy solver finished