summaryrefslogtreecommitdiffstats
path: root/kpat/freecell-solver
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:58:53 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:58:53 -0600
commit84ace1135cac57993b72fee7105b92def1638d32 (patch)
treeb8871eb76e3db4a062731b0ce7c99c24fac119e8 /kpat/freecell-solver
parent97d1732e257f8700488d7ca1660ae7eba8fc6065 (diff)
downloadtdegames-84ace1135cac57993b72fee7105b92def1638d32.tar.gz
tdegames-84ace1135cac57993b72fee7105b92def1638d32.zip
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 97d1732e257f8700488d7ca1660ae7eba8fc6065.
Diffstat (limited to 'kpat/freecell-solver')
-rw-r--r--kpat/freecell-solver/caas.c2
-rw-r--r--kpat/freecell-solver/pqueue.c2
-rw-r--r--kpat/freecell-solver/pqueue.h2
-rw-r--r--kpat/freecell-solver/state.h8
-rw-r--r--kpat/freecell-solver/test_arr.h6
-rw-r--r--kpat/freecell-solver/tests.h8
6 files changed, 14 insertions, 14 deletions
diff --git a/kpat/freecell-solver/caas.c b/kpat/freecell-solver/caas.c
index 82492f34..8e8f5ebb 100644
--- a/kpat/freecell-solver/caas.c
+++ b/kpat/freecell-solver/caas.c
@@ -531,7 +531,7 @@ GCC_INLINE int freecell_solver_check_and_add_state(
/* The new state was not found in the cache, and it was already inserted */
if (new_state->parent)
{
- new_state->parent->num_active_children++;
+ new_state->parent->num_active_tqchildren++;
}
instance->num_states_in_collection++;
diff --git a/kpat/freecell-solver/pqueue.c b/kpat/freecell-solver/pqueue.c
index 47e6280d..90afc168 100644
--- a/kpat/freecell-solver/pqueue.c
+++ b/kpat/freecell-solver/pqueue.c
@@ -145,7 +145,7 @@ void *freecell_solver_PQueuePop( PTQUEUE *pq)
for( i=PTQ_FIRST_ENTRY; (child = PTQ_LEFT_CHILD_INDEX(i)) <= CurrentSize; i=child )
{
- /* set child to the smaller of the two children... */
+ /* set child to the smaller of the two tqchildren... */
if( (child != CurrentSize) &&
(PGetRating(Elements[child + 1]) > PGetRating(Elements[child])) )
diff --git a/kpat/freecell-solver/pqueue.h b/kpat/freecell-solver/pqueue.h
index cef1b854..875741ae 100644
--- a/kpat/freecell-solver/pqueue.h
+++ b/kpat/freecell-solver/pqueue.h
@@ -47,7 +47,7 @@ typedef struct _PTQUEUE
#define PTQ_PARENT_INDEX(i) ((i)>>1)
#define PTQ_FIRST_ENTRY (1)
-/* left and right children are index * 2 and (index * 2) +1 respectively */
+/* left and right tqchildren are index * 2 and (index * 2) +1 respectively */
#define PTQ_LEFT_CHILD_INDEX(i) ((i)<<1)
#define PTQ_RIGHT_CHILD_INDEX(i) (((i)<<1)+1)
diff --git a/kpat/freecell-solver/state.h b/kpat/freecell-solver/state.h
index e52b717c..302d6d9a 100644
--- a/kpat/freecell-solver/state.h
+++ b/kpat/freecell-solver/state.h
@@ -77,7 +77,7 @@ struct fcs_struct_state_with_locations_t
int depth;
int visited;
int visited_iter;
- int num_active_children;
+ int num_active_tqchildren;
int scan_visited[MAX_NUM_SCANS_BUCKETS];
};
@@ -237,7 +237,7 @@ struct fcs_struct_state_with_locations_t
int depth;
int visited;
int visited_iter;
- int num_active_children;
+ int num_active_tqchildren;
int scan_visited[MAX_NUM_SCANS_BUCKETS];
};
@@ -508,11 +508,11 @@ struct fcs_struct_state_with_locations_t
* */
int visited_iter;
/*
- * This is the number of direct children of this state which were not
+ * This is the number of direct tqchildren of this state which were not
* yet declared as dead ends. Once this counter reaches zero, this
* state too is declared as a dead end.
* */
- int num_active_children;
+ int num_active_tqchildren;
/*
* This is a vector of flags - one for each scan. Each indicates whether
* its scan has already visited this state
diff --git a/kpat/freecell-solver/test_arr.h b/kpat/freecell-solver/test_arr.h
index cfc5cd12..911ff511 100644
--- a/kpat/freecell-solver/test_arr.h
+++ b/kpat/freecell-solver/test_arr.h
@@ -88,8 +88,8 @@ extern freecell_solver_solve_for_state_test_t freecell_solver_sfs_tests[FCS_TEST
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; \
@@ -100,7 +100,7 @@ extern freecell_solver_solve_for_state_test_t freecell_solver_sfs_tests[FCS_TEST
break; \
} \
/* Decrease the refcount */ \
- ptr_state->num_active_children--; \
+ ptr_state->num_active_tqchildren--; \
} \
} \
} \
diff --git a/kpat/freecell-solver/tests.h b/kpat/freecell-solver/tests.h
index ce0b35b5..0293ed85 100644
--- a/kpat/freecell-solver/tests.h
+++ b/kpat/freecell-solver/tests.h
@@ -66,8 +66,8 @@ extern "C" {
ptr_new_state_with_locations->depth = ptr_state_with_locations->depth + 1; \
/* Mark this state as a state that was not yet visited */ \
ptr_new_state_with_locations->visited = 0; \
- /* It's a newly created state which does not have children yet. */ \
- ptr_new_state_with_locations->num_active_children = 0; \
+ /* It's a newly created state which does not have tqchildren yet. */ \
+ ptr_new_state_with_locations->num_active_tqchildren = 0; \
memset(ptr_new_state_with_locations->scan_visited, '\0', \
sizeof(ptr_new_state_with_locations->scan_visited) \
); \
@@ -119,13 +119,13 @@ fcs_move_stack_push(moves, temp_move); \
); \
if (!(existing_state->visited & FCS_VISITED_DEAD_END)) \
{ \
- if ((--existing_state->parent->num_active_children) == 0) \
+ if ((--existing_state->parent->num_active_tqchildren) == 0) \
{ \
mark_as_dead_end( \
existing_state->parent \
); \
} \
- ptr_state_with_locations->num_active_children++; \
+ ptr_state_with_locations->num_active_tqchildren++; \
} \
existing_state->parent = ptr_state_with_locations; \
existing_state->depth = ptr_state_with_locations->depth + 1; \