1
0
Fork 0
mirror of https://github.com/shlomif/PySolFC.git synced 2025-04-05 00:02:29 -04:00

Have solver statistics without progress.

This patch implements geting the solver's final statistics without setting the
track progress. It also fixes the off-by-1 final report of the statistics with
the progress.
This commit is contained in:
Shlomi Fish 2012-03-09 11:56:37 +02:00
parent 3505a28bfe
commit 10932f1690

View file

@ -26,6 +26,7 @@
import os
import time
import subprocess
import re
# PySol imports
from settings import DEBUG, FCS_COMMAND
@ -888,9 +889,16 @@ class FreeCellSolver_Hint:
for s in pout:
if DEBUG:
print s,
# TODO:
# Total number of states checked is 6.
# This scan generated 6 states.
m = re.match('Total number of states checked is (\d+)\.', s)
if m:
iter = int(m.group(1))
self.dialog.setText(iter=iter)
m = re.match('This scan generated (\d+) states\.', s)
if m:
states = int(m.group(1))
self.dialog.setText(states=states)
if not s.startswith('Move'):
continue