diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 04:58:26 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 04:58:26 +0000 |
commit | 838baf3f99ec5ab81b063eb5449a3381d860f377 (patch) | |
tree | dd31abcfde08ca92e4623b8f50b3d762a87c997a /kpat/freecell-solver/scans.c | |
parent | 2bf598bafa22fac4126fc8842df6b0119aadc0e9 (diff) | |
download | tdegames-838baf3f99ec5ab81b063eb5449a3381d860f377.tar.gz tdegames-838baf3f99ec5ab81b063eb5449a3381d860f377.zip |
TQt4 port kdegames
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1236074 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kpat/freecell-solver/scans.c')
-rw-r--r-- | kpat/freecell-solver/scans.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/kpat/freecell-solver/scans.c b/kpat/freecell-solver/scans.c index 5c579739..31a5dd18 100644 --- a/kpat/freecell-solver/scans.c +++ b/kpat/freecell-solver/scans.c @@ -406,7 +406,7 @@ int freecell_solver_soft_dfs_or_random_dfs_do_solve_or_resume( freecell_solver_increase_dfs_max_depth(soft_thread); /* Initialize the initial state to indicate it is the first */ - ptr_state_with_locations_orig->parent = NULL; + ptr_state_with_locations_orig->tqparent = NULL; ptr_state_with_locations_orig->moves_to_parent = NULL; ptr_state_with_locations_orig->depth = 0; @@ -692,7 +692,7 @@ int freecell_solver_soft_dfs_or_random_dfs_do_solve_or_resume( ptr_recurse_into_state_with_locations->visited_iter = instance->num_times; #if 0 - ptr_recurse_into_state_with_locations->parent = ptr_state_with_locations; + ptr_recurse_into_state_with_locations->tqparent = ptr_state_with_locations; #endif /* @@ -727,7 +727,7 @@ int freecell_solver_soft_dfs_or_random_dfs_do_solve_or_resume( #undef myreturn #define FCS_A_STAR_CARDS_UNDER_SEQUENCES_EXPONENT 1.3 -#define FCS_A_STAR_SEQS_OVER_RENEGADE_CARDS_EXPONENT 1.3 +#define FCS_A_STAR_SETQS_OVER_RENEGADE_CARDS_EXPONENT 1.3 #define state (ptr_state_with_locations->s) @@ -827,7 +827,7 @@ static pq_rating_t freecell_solver_a_star_rate_state( seqs_over_renegade_cards += ((unlimited_sequence_move) ? 1 : - pow(cards_num-c-1, FCS_A_STAR_SEQS_OVER_RENEGADE_CARDS_EXPONENT) + pow(cards_num-c-1, FCS_A_STAR_SETQS_OVER_RENEGADE_CARDS_EXPONENT) ); } } @@ -836,8 +836,8 @@ static pq_rating_t freecell_solver_a_star_rate_state( / soft_thread->a_star_initial_cards_under_sequences) * a_star_weights[FCS_A_STAR_WEIGHT_CARDS_UNDER_SEQUENCES]; ret += (seqs_over_renegade_cards / - pow(decks_num*52, FCS_A_STAR_SEQS_OVER_RENEGADE_CARDS_EXPONENT) ) - * a_star_weights[FCS_A_STAR_WEIGHT_SEQS_OVER_RENEGADE_CARDS]; + pow(decks_num*52, FCS_A_STAR_SETQS_OVER_RENEGADE_CARDS_EXPONENT) ) + * a_star_weights[FCS_A_STAR_WEIGHT_SETQS_OVER_RENEGADE_CARDS]; num_cards_in_founds = 0; for(a=0;a<(decks_num<<2);a++) @@ -945,7 +945,7 @@ int freecell_solver_a_star_or_bfs_do_solve_or_resume( ); int scans_synergy = instance->scans_synergy; fcs_states_linked_list_item_t * bfs_queue = soft_thread->bfs_queue; - PQUEUE * a_star_pqueue = soft_thread->a_star_pqueue; + PTQUEUE * a_star_pqueue = soft_thread->a_star_pqueue; fcs_states_linked_list_item_t * bfs_queue_last_item = soft_thread->bfs_queue_last_item; derived.num_states = 0; @@ -958,7 +958,7 @@ int freecell_solver_a_star_or_bfs_do_solve_or_resume( if (!resume) { /* Initialize the first element to indicate it is the first */ - ptr_state_with_locations_orig->parent = NULL; + ptr_state_with_locations_orig->tqparent = NULL; ptr_state_with_locations_orig->moves_to_parent = NULL; ptr_state_with_locations_orig->depth = 0; } @@ -1027,9 +1027,9 @@ int freecell_solver_a_star_or_bfs_do_solve_or_resume( ptr_state_with_locations->depth, (void*)instance, ptr_state_with_locations, - ((ptr_state_with_locations->parent == NULL) ? + ((ptr_state_with_locations->tqparent == NULL) ? 0 : - ptr_state_with_locations->parent->visited_iter + ptr_state_with_locations->tqparent->visited_iter ) ); } |