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/test_arr.h | |
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/test_arr.h')
-rw-r--r-- | kpat/freecell-solver/test_arr.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/kpat/freecell-solver/test_arr.h b/kpat/freecell-solver/test_arr.h index cfc5cd12..821ccd98 100644 --- a/kpat/freecell-solver/test_arr.h +++ b/kpat/freecell-solver/test_arr.h @@ -26,19 +26,19 @@ typedef int (*freecell_solver_solve_for_state_test_t)( extern freecell_solver_solve_for_state_test_t freecell_solver_sfs_tests[FCS_TESTS_NUM]; /* - * This macro determines if child can be placed above parent. + * This macro determines if child can be placed above tqparent. * * The variable sequences_are_built_by has to be initialized to * the sequences_are_built_by member of the instance. * * */ -#define fcs_is_parent_card(child, parent) \ - ((fcs_card_card_num(child)+1 == fcs_card_card_num(parent)) && \ +#define fcs_is_parent_card(child, tqparent) \ + ((fcs_card_card_num(child)+1 == fcs_card_card_num(tqparent)) && \ ((sequences_are_built_by == FCS_SEQ_BUILT_BY_RANK) ? \ 1 : \ ((sequences_are_built_by == FCS_SEQ_BUILT_BY_SUIT) ? \ - (fcs_card_suit(child) == fcs_card_suit(parent)) : \ - ((fcs_card_suit(child) & 0x1) != (fcs_card_suit(parent)&0x1)) \ + (fcs_card_suit(child) == fcs_card_suit(tqparent)) : \ + ((fcs_card_suit(child) & 0x1) != (fcs_card_suit(tqparent)&0x1)) \ )) \ ) @@ -58,7 +58,7 @@ extern freecell_solver_solve_for_state_test_t freecell_solver_sfs_tests[FCS_TEST /* Count the number of states until the original state. */ \ while(ptr_state != NULL) \ { \ - ptr_state = ptr_state->parent; \ + ptr_state = ptr_state->tqparent; \ this_real_depth++; \ } \ this_real_depth--; \ @@ -68,14 +68,14 @@ extern freecell_solver_solve_for_state_test_t freecell_solver_sfs_tests[FCS_TEST { \ ptr_state->depth = this_real_depth; \ this_real_depth--; \ - ptr_state = ptr_state->parent; \ + ptr_state = ptr_state->tqparent; \ } \ } \ } \ /* * This macro marks a state as a dead end, and afterwards propogates - * this information to its parent and ancestor states. + * this information to its tqparent and ancestor states. * */ #define mark_as_dead_end(ptr_state_input) \ { \ @@ -84,23 +84,23 @@ extern freecell_solver_solve_for_state_test_t freecell_solver_sfs_tests[FCS_TEST fcs_state_with_locations_t * ptr_state = (ptr_state_input); \ /* Mark as a dead end */ \ ptr_state->visited |= FCS_VISITED_DEAD_END; \ - ptr_state = ptr_state->parent; \ + ptr_state = ptr_state->tqparent; \ if (ptr_state != NULL) \ { \ /* Decrease the refcount of the state */ \ - ptr_state->num_active_children--; \ - while((ptr_state->num_active_children == 0) && (ptr_state->visited & FCS_VISITED_ALL_TESTS_DONE)) \ + ptr_state->num_active_tqchildren--; \ + while((ptr_state->num_active_tqchildren == 0) && (ptr_state->visited & FCS_VISITED_ALL_TESTS_DONE)) \ { \ /* Mark as dead end */ \ ptr_state->visited |= FCS_VISITED_DEAD_END; \ - /* Go to its parent state */ \ - ptr_state = ptr_state->parent; \ + /* Go to its tqparent state */ \ + ptr_state = ptr_state->tqparent; \ if (ptr_state == NULL) \ { \ break; \ } \ /* Decrease the refcount */ \ - ptr_state->num_active_children--; \ + ptr_state->num_active_tqchildren--; \ } \ } \ } \ |