From 3eb36012b359ae8d48fd00344fba248c9b6aa65d Mon Sep 17 00:00:00 2001 From: Shlomi Fish Date: Wed, 22 May 2013 13:24:26 +0300 Subject: [PATCH] Start converting the move matches to regexps. --- pysollib/hint.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pysollib/hint.py b/pysollib/hint.py index 81dc6f4b..fa852e52 100644 --- a/pysollib/hint.py +++ b/pysollib/hint.py @@ -904,10 +904,15 @@ class FreeCellSolver_Hint: states = int(m.group(1)) self.dialog.setText(states=states) - if not s.startswith('Move'): + m = re.match('Move (.*)', s) + if not m: continue - words = s.split() + move_s = m.group(1) + words = move_s.split() + + words = ["Move"] + words + ncards = words[1] if ncards == 'the': # "Move the sequence on top of Stack 1 to the foundations"