mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-15 02:54:09 -04:00
stringify "args" list
This commit is contained in:
parent
2a04901a77
commit
556ceed9a6
1 changed files with 6 additions and 6 deletions
|
@ -1041,10 +1041,10 @@ class FreeCellSolver_Hint(Base_Solver_Hint):
|
||||||
args += ['-s']
|
args += ['-s']
|
||||||
if self.options['preset'] and self.options['preset'] != 'none':
|
if self.options['preset'] and self.options['preset'] != 'none':
|
||||||
args += ['--load-config', self.options['preset']]
|
args += ['--load-config', self.options['preset']]
|
||||||
args += ['--max-iters', self.options['max_iters'],
|
args += ['--max-iters', str(self.options['max_iters']),
|
||||||
'--decks-num', game.gameinfo.decks,
|
'--decks-num', str(game.gameinfo.decks),
|
||||||
'--stacks-num', len(game.s.rows),
|
'--stacks-num', str(len(game.s.rows)),
|
||||||
'--freecells-num', len(game.s.reserves),
|
'--freecells-num', str(len(game.s.reserves)),
|
||||||
]
|
]
|
||||||
#
|
#
|
||||||
if 'preset' in game_type:
|
if 'preset' in game_type:
|
||||||
|
@ -1060,12 +1060,12 @@ class FreeCellSolver_Hint(Base_Solver_Hint):
|
||||||
import freecell_solver
|
import freecell_solver
|
||||||
obj = freecell_solver.FreecellSolver()
|
obj = freecell_solver.FreecellSolver()
|
||||||
print(args)
|
print(args)
|
||||||
obj.input_cmd_line([str(s) for s in args])
|
obj.input_cmd_line(args)
|
||||||
status = obj.solve_board(board)
|
status = obj.solve_board(board)
|
||||||
if status != 0:
|
if status != 0:
|
||||||
assert 0
|
assert 0
|
||||||
else:
|
else:
|
||||||
command = FCS_COMMAND+' '+' '.join([str(i) for i in args])
|
command = FCS_COMMAND+' '+' '.join(args)
|
||||||
pout, perr = self.run_solver(command, board)
|
pout, perr = self.run_solver(command, board)
|
||||||
self.solver_state = 'unknown'
|
self.solver_state = 'unknown'
|
||||||
#
|
#
|
||||||
|
|
Loading…
Add table
Reference in a new issue