From 2256f5d9f228199aeb229efa4ed216e5f6865a4b Mon Sep 17 00:00:00 2001 From: skomoroh Date: Tue, 5 Jun 2012 18:44:08 +0000 Subject: [PATCH] Display final statistics in solver git-svn-id: https://pysolfc.svn.sourceforge.net/svnroot/pysolfc/PySolFC/trunk@279 39dd0a4e-7c14-0410-91b3-c4f2d318f732 --- pysollib/hint.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pysollib/hint.py b/pysollib/hint.py index 57c7632a..ba53daac 100644 --- a/pysollib/hint.py +++ b/pysollib/hint.py @@ -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