Skip to content

Instantly share code, notes, and snippets.

@soap-DEIM
Created May 6, 2014 07:31
Show Gist options
  • Save soap-DEIM/7bbde6fe8e5f99fbb115 to your computer and use it in GitHub Desktop.
Save soap-DEIM/7bbde6fe8e5f99fbb115 to your computer and use it in GitHub Desktop.
function solve_board_step(solve_state) {
if (solve_state.p >= solve_state.max_length) {
solve_state.finish_callback(solve_state.solutions);
return;
}
++ solve_state.p;
solve_state.solutions = evolve_solutions(solve_state.solutions,
solve_state.weights,
solve_state.dir_step);
solve_state.step_callback(solve_state.p, solve_state.max_length);
setTimeout(function() { solve_board_step(solve_state); }, 0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment