mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
update the solver iter and states counts.
This commit is contained in:
parent
3de9955879
commit
41c2633fcd
1 changed files with 23 additions and 17 deletions
|
@ -1108,24 +1108,30 @@ class FreeCellSolver_Hint(Base_Solver_Hint):
|
||||||
self.dialog.setText(iter=iter_, depth=depth, states=states)
|
self.dialog.setText(iter=iter_, depth=depth, states=states)
|
||||||
|
|
||||||
hints = []
|
hints = []
|
||||||
if use_fc_solve_lib and status == 0:
|
if use_fc_solve_lib:
|
||||||
m = fc_solve_lib_obj.get_next_move()
|
self.dialog.setText(
|
||||||
while m:
|
iter=fc_solve_lib_obj.get_num_times(),
|
||||||
type_ = ord(m.s[0])
|
depth=0,
|
||||||
src = ord(m.s[1])
|
states=fc_solve_lib_obj.get_num_states_in_collection(),
|
||||||
dest = ord(m.s[2])
|
)
|
||||||
hints.append([
|
if status == 0:
|
||||||
(ord(m.s[3]) if type_ == 0
|
|
||||||
else (13 if type_ == 11 else 1)),
|
|
||||||
(game.s.rows if (type_ in [0, 1, 4, 11, ])
|
|
||||||
else game.s.reserves)[src],
|
|
||||||
(game.s.rows[dest] if (type_ in [0, 2])
|
|
||||||
else (game.s.reserves[dest]
|
|
||||||
if (type_ in [1, 3]) else None))])
|
|
||||||
|
|
||||||
m = fc_solve_lib_obj.get_next_move()
|
m = fc_solve_lib_obj.get_next_move()
|
||||||
elif use_fc_solve_lib:
|
while m:
|
||||||
self.solver_state = 'unsolved'
|
type_ = ord(m.s[0])
|
||||||
|
src = ord(m.s[1])
|
||||||
|
dest = ord(m.s[2])
|
||||||
|
hints.append([
|
||||||
|
(ord(m.s[3]) if type_ == 0
|
||||||
|
else (13 if type_ == 11 else 1)),
|
||||||
|
(game.s.rows if (type_ in [0, 1, 4, 11, ])
|
||||||
|
else game.s.reserves)[src],
|
||||||
|
(game.s.rows[dest] if (type_ in [0, 2])
|
||||||
|
else (game.s.reserves[dest]
|
||||||
|
if (type_ in [1, 3]) else None))])
|
||||||
|
|
||||||
|
m = fc_solve_lib_obj.get_next_move()
|
||||||
|
else:
|
||||||
|
self.solver_state = 'unsolved'
|
||||||
else:
|
else:
|
||||||
for sbytes in pout:
|
for sbytes in pout:
|
||||||
s = six.text_type(sbytes, encoding='utf-8')
|
s = six.text_type(sbytes, encoding='utf-8')
|
||||||
|
|
Loading…
Add table
Reference in a new issue