mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
Made the iters_output_step configurable.
This commit is contained in:
parent
7407276829
commit
02edf2afdd
3 changed files with 8 additions and 2 deletions
|
@ -740,6 +740,7 @@ class Base_Solver_Hint:
|
|||
self.dialog = dialog
|
||||
self.game_type = game_type
|
||||
self.options = {
|
||||
'iters_step': 100,
|
||||
'max_iters': 10000,
|
||||
'progress': False,
|
||||
'preset': None,
|
||||
|
@ -1024,7 +1025,7 @@ class FreeCellSolver_Hint(Base_Solver_Hint):
|
|||
fcs_iter_output_step = None
|
||||
if FCS_VERSION >= (4, 20, 0):
|
||||
# fcs_iter_output_step = 10000
|
||||
fcs_iter_output_step = 100
|
||||
fcs_iter_output_step = self.options['iters_step']
|
||||
args += ['--iter-output-step', str(fcs_iter_output_step)]
|
||||
if DEBUG:
|
||||
args += ['-s']
|
||||
|
|
|
@ -113,6 +113,7 @@ translate_game_names = boolean
|
|||
solver_presets = string_list
|
||||
solver_show_progress = boolean
|
||||
solver_max_iterations = integer
|
||||
solver_iterations_output_step = integer
|
||||
display_win_message = boolean
|
||||
|
||||
[sound_samples]
|
||||
|
@ -249,6 +250,7 @@ class Options:
|
|||
('solver_presets', 'list'),
|
||||
('solver_show_progress', 'bool'),
|
||||
('solver_max_iterations', 'int'),
|
||||
('solver_iterations_output_step', 'int'),
|
||||
# ('toolbar_vars', 'list'),
|
||||
# ('recent_gameid', 'list'),
|
||||
# ('favorite_gameid', 'list'),
|
||||
|
@ -432,6 +434,7 @@ class Options:
|
|||
]
|
||||
self.solver_show_progress = True
|
||||
self.solver_max_iterations = 100000
|
||||
self.solver_iterations_output_step = 100
|
||||
|
||||
def setDefaults(self, top=None):
|
||||
WIN_SYSTEM = pysollib.settings.WIN_SYSTEM
|
||||
|
|
|
@ -167,7 +167,9 @@ class BaseSolverDialog:
|
|||
preset = self.preset_var.get()
|
||||
max_iters = self._getMaxIters()
|
||||
progress = self.app.opt.solver_show_progress
|
||||
solver.config(preset=preset, max_iters=max_iters, progress=progress)
|
||||
iters_step = self.app.opt.solver_iterations_output_step
|
||||
solver.config(preset=preset, max_iters=max_iters, progress=progress,
|
||||
iters_step=iters_step)
|
||||
try:
|
||||
solver.computeHints()
|
||||
except RuntimeError:
|
||||
|
|
Loading…
Add table
Reference in a new issue