Changeset View
Changeset View
Standalone View
Standalone View
patsolve/abstract_fc_solve_solver.cpp
Show First 20 Lines • Show All 48 Lines • ▼ Show 20 Line(s) | 45 | { | |||
---|---|---|---|---|---|
49 | init(); | 49 | init(); | ||
50 | 50 | | |||
51 | int no_use = 0; | 51 | int no_use = 0; | ||
52 | int num_moves = 0; | 52 | int num_moves = 0; | ||
53 | get_possible_moves(&no_use, &num_moves); | 53 | get_possible_moves(&no_use, &num_moves); | ||
54 | Q_ASSERT( m_firstMoves.count() == 0 ); | 54 | Q_ASSERT( m_firstMoves.count() == 0 ); | ||
55 | for (int j = 0; j < num_moves; ++j) | 55 | for (int j = 0; j < num_moves; ++j) | ||
56 | m_firstMoves.append( Possible[j] ); | 56 | m_firstMoves.append( Possible[j] ); | ||
57 | if (max_positions < 20) | ||||
58 | { | ||||
59 | return Solver::UnableToDetermineSolvability; | ||||
60 | } | ||||
57 | if (!solver_instance) | 61 | if (!solver_instance) | ||
58 | { | 62 | { | ||
59 | { | 63 | { | ||
60 | solver_instance = freecell_solver_user_alloc(); | 64 | solver_instance = freecell_solver_user_alloc(); | ||
61 | 65 | | |||
62 | solver_ret = FCS_STATE_NOT_BEGAN_YET; | 66 | solver_ret = FCS_STATE_NOT_BEGAN_YET; | ||
63 | 67 | | |||
64 | char * error_string; | 68 | char * error_string; | ||
▲ Show 20 Lines • Show All 182 Lines • Show Last 20 Lines |