diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 22:19:39 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 22:19:39 +0000 |
commit | a13e26c2f1eb3c5be81acf4f571dd4bafac10199 (patch) | |
tree | 1f1d3e407ae668b1448847970b2f1b626083faf6 /kpat/freecell-solver/simpsim.c | |
parent | 24c5cdc2737fe0044b11a12359606973eb93fc0b (diff) | |
download | tdegames-a13e26c2f1eb3c5be81acf4f571dd4bafac10199.tar.gz tdegames-a13e26c2f1eb3c5be81acf4f571dd4bafac10199.zip |
rename the following methods:
tqparent parent
tqmask mask
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1246260 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kpat/freecell-solver/simpsim.c')
-rw-r--r-- | kpat/freecell-solver/simpsim.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/kpat/freecell-solver/simpsim.c b/kpat/freecell-solver/simpsim.c index 5ef8a411..f603ba39 100644 --- a/kpat/freecell-solver/simpsim.c +++ b/kpat/freecell-solver/simpsim.c @@ -19,16 +19,16 @@ #endif -#define fcs_is_ss_false_parent(tqparent, child) \ - (fcs_card_card_num(tqparent) == fcs_card_card_num(child)+1) +#define fcs_is_ss_false_parent(parent, child) \ + (fcs_card_card_num(parent) == fcs_card_card_num(child)+1) #define fcs_suit_is_ss_true_parent(parent_suit, child_suit) \ ((parent_suit) == (child_suit)) -#define fcs_is_ss_true_parent(tqparent, child) \ +#define fcs_is_ss_true_parent(parent, child) \ ( \ - fcs_is_ss_false_parent(tqparent,child) && \ - (fcs_suit_is_ss_true_parent(fcs_card_suit(tqparent),fcs_card_suit(child))) \ + fcs_is_ss_false_parent(parent,child) && \ + (fcs_suit_is_ss_true_parent(fcs_card_suit(parent),fcs_card_suit(child))) \ ) /* @@ -185,7 +185,7 @@ int freecell_solver_sfs_simple_simon_move_sequence_to_true_parent( if (cards_num > 0) { /* Loop on the cards in the stack and try to look for a true - * tqparent on top one of the stacks */ + * parent on top one of the stacks */ card = fcs_stack_card(state,stack,cards_num-1); card_num = fcs_card_card_num(card); suit = fcs_card_suit(card); @@ -208,7 +208,7 @@ int freecell_solver_sfs_simple_simon_move_sequence_to_true_parent( (fcs_card_card_num(dest_card) == (card_num+1)) ) { - /* This is a suitable tqparent - let's check if we + /* This is a suitable parent - let's check if we * have enough empty stacks to make the move feasible */ if (calc_max_sequence_move(0, num_freestacks) >= num_true_seqs) { @@ -334,7 +334,7 @@ int freecell_solver_sfs_simple_simon_move_whole_stack_sequence_to_false_parent( (fcs_is_ss_false_parent(dest_card, card)) ) { - /* This is a suitable tqparent - let's check if we + /* This is a suitable parent - let's check if we * have enough empty stacks to make the move feasible */ if (calc_max_sequence_move(0, num_freestacks) >= num_true_seqs) { @@ -387,7 +387,7 @@ int freecell_solver_sfs_simple_simon_move_sequence_to_true_parent_with_some_card * dest_cards_num - the number of cards in "ds" * dc - the index of the current card in "ds". * num_separate_false_seqs - this variable tells how many distinct false - * sequences exist above the true tqparent + * sequences exist above the true parent * above_num_true_seqs[] - the number of true sequences in each false * sequence * seq_points[] - the separation points of the false sequences (i.e: where @@ -451,7 +451,7 @@ int freecell_solver_sfs_simple_simon_move_sequence_to_true_parent_with_some_card (fcs_card_card_num(dest_card) == (card_num+1)) ) { - /* This is a suitable tqparent - let's check if there's a sequence above it. */ + /* This is a suitable parent - let's check if there's a sequence above it. */ /* * above_c - the height of the card that is to be checked. @@ -504,7 +504,7 @@ int freecell_solver_sfs_simple_simon_move_sequence_to_true_parent_with_some_card int clear_junk_dest_stack = -1; - /* Let's try to find a suitable tqparent on top one of the stacks */ + /* Let's try to find a suitable parent on top one of the stacks */ for(clear_junk_dest_stack=0; clear_junk_dest_stack < state_stacks_num; clear_junk_dest_stack++ @@ -573,7 +573,7 @@ int freecell_solver_sfs_simple_simon_move_sequence_to_true_parent_with_some_card /* * We can do it - so let's move everything. * Notice that we only put the child in a different stack - * then the tqparent and let it move to the tqparent in the + * then the parent and let it move to the parent in the * next iteration of the program * */ @@ -743,7 +743,7 @@ int freecell_solver_sfs_simple_simon_move_sequence_with_some_cards_above_to_true (fcs_card_card_num(dest_card) == (card_num+1)) ) { - /* This is a suitable tqparent - let's check if we + /* This is a suitable parent - let's check if we * have enough empty stacks to make the move feasible */ for(a=0;a<state_stacks_num;a++) @@ -761,7 +761,7 @@ int freecell_solver_sfs_simple_simon_move_sequence_with_some_cards_above_to_true int clear_junk_dest_stack = -1; - /* Let's try to find a suitable tqparent on top one of the stacks */ + /* Let's try to find a suitable parent on top one of the stacks */ for(clear_junk_dest_stack=0; clear_junk_dest_stack < state_stacks_num; clear_junk_dest_stack++ @@ -1013,7 +1013,7 @@ int freecell_solver_sfs_simple_simon_move_sequence_with_junk_seq_above_to_true_p (fcs_card_card_num(dest_card) == (card_num+1)) ) { - /* This is a suitable tqparent - let's check if there's a sequence above it. */ + /* This is a suitable parent - let's check if there's a sequence above it. */ int above_c; fcs_card_t above_card, up_above_card; @@ -1068,7 +1068,7 @@ int freecell_solver_sfs_simple_simon_move_sequence_with_junk_seq_above_to_true_p above_num_true_seqs[false_seq_index] ); - /* Let's try to find a suitable tqparent on top one of the stacks */ + /* Let's try to find a suitable parent on top one of the stacks */ for(clear_junk_dest_stack=0; clear_junk_dest_stack < state_stacks_num; clear_junk_dest_stack++ @@ -1218,7 +1218,7 @@ int freecell_solver_sfs_simple_simon_move_whole_stack_sequence_to_false_parent_w * dest_cards_num - the number of cards in it. * dc - the height of the card in "ds". * num_separate_false_seqs - this variable tells how many distinct false - * sequences exist above the false tqparent + * sequences exist above the false parent * above_num_true_seqs[] - the number of true sequences in each false * sequence * seq_points[] - the separation points of the false sequences (i.e: where @@ -1291,7 +1291,7 @@ int freecell_solver_sfs_simple_simon_move_whole_stack_sequence_to_false_parent_w (fcs_card_card_num(dest_card) == (card_num+1)) ) { - /* This is a suitable tqparent - let's check if there's a sequence above it. */ + /* This is a suitable parent - let's check if there's a sequence above it. */ int above_c; fcs_card_t above_card, up_above_card; @@ -1341,7 +1341,7 @@ int freecell_solver_sfs_simple_simon_move_whole_stack_sequence_to_false_parent_w above_num_true_seqs[false_seq_index]; - /* Let's try to find a suitable tqparent on top one of the stacks */ + /* Let's try to find a suitable parent on top one of the stacks */ for(clear_junk_dest_stack=0; clear_junk_dest_stack < state_stacks_num; clear_junk_dest_stack++ @@ -1380,7 +1380,7 @@ int freecell_solver_sfs_simple_simon_move_whole_stack_sequence_to_false_parent_w if (false_seq_index == num_separate_false_seqs) { - /* This is a suitable tqparent - let's check if we + /* This is a suitable parent - let's check if we * have enough empty stacks to make the move feasible */ if (calc_max_sequence_move(0, num_freestacks) >= num_true_seqs) { @@ -1468,7 +1468,7 @@ int freecell_solver_sfs_simple_simon_move_sequence_to_parent_on_the_same_stack( cards_num = fcs_stack_len(state, stack); if (cards_num > 2) { - /* Search for a tqparent card */ + /* Search for a parent card */ for(pc=0; pc < cards_num-1 ; pc++) { parent_card = fcs_stack_card(state, stack, pc); @@ -1492,7 +1492,7 @@ int freecell_solver_sfs_simple_simon_move_sequence_to_parent_on_the_same_stack( ) ) { - /* We have a matching tqparent and child cards */ + /* We have a matching parent and child cards */ #if 0 printf("Stack %i, Parent %i, Child %i\n", stack, pc, cc); fflush(stdout); @@ -1559,7 +1559,7 @@ int freecell_solver_sfs_simple_simon_move_sequence_to_parent_on_the_same_stack( above_num_true_seqs[num_separate_false_seqs] = child_num_true_seqs; seq_points[num_separate_false_seqs++] = cc; - /* Add the cards between the tqparent and the child to the seq_points */ + /* Add the cards between the parent and the child to the seq_points */ above_card = fcs_stack_card(state, stack, cc-1); above_num_true_seqs[num_separate_false_seqs] = 1; @@ -1599,7 +1599,7 @@ int freecell_solver_sfs_simple_simon_move_sequence_to_parent_on_the_same_stack( int clear_junk_dest_stack = -1; - /* Let's try to find a suitable tqparent on top one of the stacks */ + /* Let's try to find a suitable parent on top one of the stacks */ for(clear_junk_dest_stack=0; clear_junk_dest_stack < state_stacks_num; clear_junk_dest_stack++ |