summaryrefslogtreecommitdiffstats
path: root/kpat
diff options
context:
space:
mode:
Diffstat (limited to 'kpat')
-rw-r--r--kpat/card.h2
-rw-r--r--kpat/clock.cpp6
-rw-r--r--kpat/clock.h2
-rw-r--r--kpat/computation.cpp6
-rw-r--r--kpat/computation.h2
-rw-r--r--kpat/dealer.cpp16
-rw-r--r--kpat/dealer.h6
-rw-r--r--kpat/deck.cpp8
-rw-r--r--kpat/deck.h4
-rw-r--r--kpat/fortyeight.cpp10
-rw-r--r--kpat/fortyeight.h4
-rw-r--r--kpat/freecell-solver/USAGE28
-rw-r--r--kpat/freecell-solver/caas.c12
-rw-r--r--kpat/freecell-solver/fcs.h2
-rw-r--r--kpat/freecell-solver/fcs_hash.c12
-rw-r--r--kpat/freecell-solver/fcs_hash.h4
-rw-r--r--kpat/freecell-solver/freecell.c12
-rw-r--r--kpat/freecell-solver/intrface.c8
-rw-r--r--kpat/freecell-solver/lookup2.c2
-rw-r--r--kpat/freecell-solver/main.c32
-rw-r--r--kpat/freecell-solver/pqueue.c2
-rw-r--r--kpat/freecell-solver/pqueue.h2
-rw-r--r--kpat/freecell-solver/scans.c10
-rw-r--r--kpat/freecell-solver/simpsim.c48
-rw-r--r--kpat/freecell-solver/state.h6
-rw-r--r--kpat/freecell-solver/test_arr.h22
-rw-r--r--kpat/freecell-solver/tests.h12
-rw-r--r--kpat/freecell.cpp12
-rw-r--r--kpat/freecell.h4
-rw-r--r--kpat/golf.cpp10
-rw-r--r--kpat/golf.h4
-rw-r--r--kpat/grandf.cpp6
-rw-r--r--kpat/grandf.h2
-rw-r--r--kpat/gypsy.cpp6
-rw-r--r--kpat/gypsy.h2
-rw-r--r--kpat/idiot.cpp6
-rw-r--r--kpat/idiot.h2
-rw-r--r--kpat/kings.cpp6
-rw-r--r--kpat/kings.h2
-rw-r--r--kpat/klondike.cpp12
-rw-r--r--kpat/klondike.h2
-rw-r--r--kpat/mod3.cpp6
-rw-r--r--kpat/mod3.h2
-rw-r--r--kpat/napoleon.cpp6
-rw-r--r--kpat/napoleon.h2
-rw-r--r--kpat/pile.h2
-rw-r--r--kpat/simon.cpp6
-rw-r--r--kpat/simon.h2
-rw-r--r--kpat/spider.cpp10
-rw-r--r--kpat/spider.h4
-rw-r--r--kpat/yukon.cpp6
-rw-r--r--kpat/yukon.h2
52 files changed, 202 insertions, 202 deletions
diff --git a/kpat/card.h b/kpat/card.h
index 88b4fec3..109f3e87 100644
--- a/kpat/card.h
+++ b/kpat/card.h
@@ -54,7 +54,7 @@ public:
enum Rank { None = 0, Ace = 1, Two, Three, Four, Five, Six, Seven,
Eight, Nine, Ten, Jack, Queen, King };
- Card( Rank r, Suit s, TQCanvas *tqparent=0);
+ Card( Rank r, Suit s, TQCanvas *parent=0);
virtual ~Card();
// Properties of the card.
diff --git a/kpat/clock.cpp b/kpat/clock.cpp
index dec72cc0..7fcb94b4 100644
--- a/kpat/clock.cpp
+++ b/kpat/clock.cpp
@@ -4,8 +4,8 @@
#include <assert.h>
#include "cardmaps.h"
-Clock::Clock( KMainWindow* tqparent, const char *name )
- : Dealer( tqparent, name )
+Clock::Clock( KMainWindow* parent, const char *name )
+ : Dealer( parent, name )
{
const int dist_x = cardMap::CARDX() * 11 / 10 + 1;
const int dist_y = cardMap::CARDY() * 11 / 10 + 1;
@@ -85,7 +85,7 @@ static class LocalDealerInfo11 : public DealerInfo
{
public:
LocalDealerInfo11() : DealerInfo(I18N_NOOP("G&randfather's Clock"), 11) {}
- virtual Dealer *createGame(KMainWindow *tqparent) { return new Clock(tqparent); }
+ virtual Dealer *createGame(KMainWindow *parent) { return new Clock(parent); }
} gfi11;
#include "clock.moc"
diff --git a/kpat/clock.h b/kpat/clock.h
index 8aaead34..0107fec8 100644
--- a/kpat/clock.h
+++ b/kpat/clock.h
@@ -8,7 +8,7 @@ class Clock : public Dealer {
TQ_OBJECT
public:
- Clock( KMainWindow* tqparent=0, const char* name=0);
+ Clock( KMainWindow* parent=0, const char* name=0);
virtual bool checkAdd ( int checkIndex, const Pile *c1, const CardList& c2) const;
virtual bool startAutoDrop() { return false; }
diff --git a/kpat/computation.cpp b/kpat/computation.cpp
index 0da5f226..22f104aa 100644
--- a/kpat/computation.cpp
+++ b/kpat/computation.cpp
@@ -27,8 +27,8 @@
#include <assert.h>
#include "cardmaps.h"
-Computation::Computation( KMainWindow *tqparent, const char *name )
- :Dealer( tqparent, name)
+Computation::Computation( KMainWindow *parent, const char *name )
+ :Dealer( parent, name)
{
deck = Deck::new_deck(this);
deck->hide();
@@ -114,7 +114,7 @@ static class LocalDealerInfo6 : public DealerInfo
{
public:
LocalDealerInfo6() : DealerInfo(I18N_NOOP("&Calculation"), 6) {}
- virtual Dealer *createGame(KMainWindow *tqparent) { return new Computation(tqparent); }
+ virtual Dealer *createGame(KMainWindow *parent) { return new Computation(parent); }
} ldi6;
#include "computation.moc"
diff --git a/kpat/computation.h b/kpat/computation.h
index ea988f2d..b1658d57 100644
--- a/kpat/computation.h
+++ b/kpat/computation.h
@@ -33,7 +33,7 @@ class Computation : public Dealer {
TQ_OBJECT
public:
- Computation( KMainWindow *tqparent = 0, const char *name=0 );
+ Computation( KMainWindow *parent = 0, const char *name=0 );
virtual void restart();
diff --git a/kpat/dealer.cpp b/kpat/dealer.cpp
index c1ae25e7..d3cdecad 100644
--- a/kpat/dealer.cpp
+++ b/kpat/dealer.cpp
@@ -116,7 +116,7 @@ void Dealer::setupActions() {
ahint = new KAction( i18n("&Hint"), TQString::tqfromLatin1("wizard"), Key_H, TQT_TQOBJECT(this),
TQT_SLOT(hint()),
- tqparent()->actionCollection(), "game_hint");
+ parent()->actionCollection(), "game_hint");
actionlist.append(ahint);
} else
ahint = 0;
@@ -124,7 +124,7 @@ void Dealer::setupActions() {
if (actions() & Dealer::Demo) {
ademo = new KToggleAction( i18n("&Demo"), TQString::tqfromLatin1("1rightarrow"), CTRL+Key_D, TQT_TQOBJECT(this),
TQT_SLOT(toggleDemo()),
- tqparent()->actionCollection(), "game_demo");
+ parent()->actionCollection(), "game_demo");
actionlist.append(ademo);
} else
ademo = 0;
@@ -132,12 +132,12 @@ void Dealer::setupActions() {
if (actions() & Dealer::Redeal) {
aredeal = new KAction (i18n("&Redeal"), TQString::tqfromLatin1("queue"), 0, TQT_TQOBJECT(this),
TQT_SLOT(redeal()),
- tqparent()->actionCollection(), "game_redeal");
+ parent()->actionCollection(), "game_redeal");
actionlist.append(aredeal);
} else
aredeal = 0;
- tqparent()->guiFactory()->plugActionList( tqparent(), TQString::tqfromLatin1("game_actions"), actionlist);
+ parent()->guiFactory()->plugActionList( parent(), TQString::tqfromLatin1("game_actions"), actionlist);
}
Dealer::~Dealer()
@@ -145,7 +145,7 @@ Dealer::~Dealer()
if (!_won)
countLoss();
clearHints();
- tqparent()->guiFactory()->unplugActionList( tqparent(), TQString::tqfromLatin1("game_actions"));
+ parent()->guiFactory()->unplugActionList( parent(), TQString::tqfromLatin1("game_actions"));
while (!piles.isEmpty())
delete piles.first(); // removes itself
@@ -154,9 +154,9 @@ Dealer::~Dealer()
s_instance = 0;
}
-KMainWindow *Dealer::tqparent() const
+KMainWindow *Dealer::parent() const
{
- return dynamic_cast<KMainWindow*>(TQCanvasView::tqparent());
+ return dynamic_cast<KMainWindow*>(TQCanvasView::parent());
}
@@ -735,7 +735,7 @@ State *Dealer::getState()
s.it = c;
s.source = c->source();
if (!s.source) {
- kdDebug(11111) << c->name() << " has no tqparent\n";
+ kdDebug(11111) << c->name() << " has no parent\n";
assert(false);
}
s.source_index = c->source()->indexOf(c);
diff --git a/kpat/dealer.h b/kpat/dealer.h
index 63b5bde9..5c4e60f1 100644
--- a/kpat/dealer.h
+++ b/kpat/dealer.h
@@ -35,7 +35,7 @@ public:
}
const char *name;
uint gameindex;
- virtual Dealer *createGame(KMainWindow *tqparent) = 0;
+ virtual Dealer *createGame(KMainWindow *parent) = 0;
};
class CardState;
@@ -61,7 +61,7 @@ class Dealer: public TQCanvasView
public:
- Dealer( KMainWindow* tqparent = 0, const char* name = 0 );
+ Dealer( KMainWindow* parent = 0, const char* name = 0 );
virtual ~Dealer();
static const Dealer *instance();
@@ -171,7 +171,7 @@ protected:
// it's not const because it changes the random seed
virtual MoveHint *chooseHint();
- KMainWindow *tqparent() const;
+ KMainWindow *parent() const;
bool waiting() const { return _waiting != 0; }
void setWaiting(bool w);
diff --git a/kpat/deck.cpp b/kpat/deck.cpp
index 860a88b7..c2b6e0e5 100644
--- a/kpat/deck.cpp
+++ b/kpat/deck.cpp
@@ -10,8 +10,8 @@ const int NumberOfCards = 52;
Deck *Deck::my_deck = 0;
-Deck::Deck( Dealer* tqparent, int m, int s )
- : Pile( 0, tqparent ), mult( m )
+Deck::Deck( Dealer* parent, int m, int s )
+ : Pile( 0, parent ), mult( m )
{
_deck = new Card * [mult*NumberOfCards];
Q_CHECK_PTR (_deck);
@@ -44,9 +44,9 @@ Deck::~Deck()
// ----------------------------------------------------------------
-Deck *Deck::new_deck( Dealer *tqparent, int m, int s )
+Deck *Deck::new_deck( Dealer *parent, int m, int s )
{
- my_deck = new Deck(tqparent, m, s);
+ my_deck = new Deck(parent, m, s);
return my_deck;
}
diff --git a/kpat/deck.h b/kpat/deck.h
index eb13268c..f5239fe0 100644
--- a/kpat/deck.h
+++ b/kpat/deck.h
@@ -13,11 +13,11 @@ class Deck: public Pile
{
private:
- Deck( Dealer* tqparent = 0, int m = 1, int s = 4 );
+ Deck( Dealer* parent = 0, int m = 1, int s = 4 );
virtual ~Deck();
public:
- static Deck *new_deck( Dealer *tqparent = 0, int m = 1, int s = 4 );
+ static Deck *new_deck( Dealer *parent = 0, int m = 1, int s = 4 );
static Deck *deck() { return my_deck; }
static const long n;
diff --git a/kpat/fortyeight.cpp b/kpat/fortyeight.cpp
index e3e72385..1747b647 100644
--- a/kpat/fortyeight.cpp
+++ b/kpat/fortyeight.cpp
@@ -5,8 +5,8 @@
#include <assert.h>
#include "cardmaps.h"
-HorLeftPile::HorLeftPile( int _index, Dealer* tqparent)
- : Pile(_index, tqparent)
+HorLeftPile::HorLeftPile( int _index, Dealer* parent)
+ : Pile(_index, parent)
{
// TODO: create a pile that moves the cards together when filling space
setHSpread( cardMap::CARDX() / 11 + 1 );
@@ -27,8 +27,8 @@ void HorLeftPile::initSizes()
}
-Fortyeight::Fortyeight( KMainWindow* tqparent, const char* name)
- : Dealer(tqparent,name)
+Fortyeight::Fortyeight( KMainWindow* parent, const char* name)
+ : Dealer(parent,name)
{
deck = Deck::new_deck(this, 2);
@@ -194,7 +194,7 @@ static class LocalDealerInfo8 : public DealerInfo
{
public:
LocalDealerInfo8() : DealerInfo(I18N_NOOP("Forty && &Eight"), 8) {}
- virtual Dealer *createGame(KMainWindow *tqparent) { return new Fortyeight(tqparent); }
+ virtual Dealer *createGame(KMainWindow *parent) { return new Fortyeight(parent); }
} ldi9;
//-------------------------------------------------------------------------//
diff --git a/kpat/fortyeight.h b/kpat/fortyeight.h
index 4489ffb1..3bb43b2b 100644
--- a/kpat/fortyeight.h
+++ b/kpat/fortyeight.h
@@ -9,7 +9,7 @@ class HorLeftPile : public Pile
TQ_OBJECT
public:
- HorLeftPile( int _index, Dealer* tqparent = 0);
+ HorLeftPile( int _index, Dealer* parent = 0);
virtual TQSize cardOffset( bool _spread, bool _facedown, const Card *before) const;
virtual void initSizes();
};
@@ -20,7 +20,7 @@ class Fortyeight : public Dealer
TQ_OBJECT
public:
- Fortyeight( KMainWindow* tqparent=0, const char* name=0);
+ Fortyeight( KMainWindow* parent=0, const char* name=0);
virtual bool isGameLost() const;
public slots:
diff --git a/kpat/freecell-solver/USAGE b/kpat/freecell-solver/USAGE
index 9cffe4e1..16f5c93d 100644
--- a/kpat/freecell-solver/USAGE
+++ b/kpat/freecell-solver/USAGE
@@ -67,7 +67,7 @@ program with some effort on the programmer's part.
This option will display the moves in standard notation in which every
move consists of two characters and there are ten moves in a line. Naturally,
-this option will only become aptqparent if the display moves is specified.
+this option will only become apparent if the display moves is specified.
(it does not implicitly specify it, though).
For more information regarding standard notation refer to the following
@@ -89,7 +89,7 @@ are needed to move from one to another. The standard notation
option applies to it to.
--pi --display-tqparent-iter
+-pi --display-parent-iter
This option (assuming the -s and -i options are specified) will also
display the iteration index of the state from which the current state
@@ -217,34 +217,34 @@ Freecell Tests:
'2' - put freecell cards on top of stacks.
'3' - put non-top stack cards in the foundations.
'4' - move stack cards to different stacks.
-'5' - move stack cards to a tqparent card on the same stack.
+'5' - move stack cards to a parent card on the same stack.
'6' - move sequences of cards onto free stacks.
'7' - put freecell cards on empty stacks.
-'8' - move cards to a different tqparent.
+'8' - move cards to a different parent.
'9' - empty an entire stack into the freecells.
Atomic Freecell Tests:
'A' - move a stack card to an empty stack.
-'B' - move a stack card to a tqparent on a different stack.
+'B' - move a stack card to a parent on a different stack.
'C' - move a stack card to a freecell.
-'D' - move a freecell card to a tqparent.
+'D' - move a freecell card to a parent.
'E' - move a freecell card to an empty stack.
Simple Simon Tests:
'a' - move a full sequence to the foundations.
-'b' - move a sequence to a true tqparent of his.
-'c' - move a whole stack sequence to a false tqparent (in order to clear
+'b' - move a sequence to a true parent of his.
+'c' - move a whole stack sequence to a false parent (in order to clear
the stack)
-'d' - move a sequence to a true tqparent that has some cards above it.
-'e' - move a sequence with some cards above it to a true tqparent.
-'f' - move a sequence with a junk sequence above it to a true tqparent that
+'d' - move a sequence to a true parent that has some cards above it.
+'e' - move a sequence with some cards above it to a true parent.
+'f' - move a sequence with a junk sequence above it to a true parent that
has some cards above it.
-'g' - move a whole stack sequence to a false tqparent which has some
+'g' - move a whole stack sequence to a false parent which has some
cards above it.
-'h' - move a sequence to a tqparent on the same stack.
+'h' - move a sequence to a parent on the same stack.
Manipulating the tests order can be very helpful to the quick solution
of a given board. If you found that a certain board cannot be solved in
@@ -332,7 +332,7 @@ used in all the normal scans.
--reparent-states
This option specifies that states that were encountered whose depth in the
-states graph can be improved should be reparented to the new tqparent. This
+states graph can be improved should be reparented to the new parent. This
option can possibly make solutions shorter.
diff --git a/kpat/freecell-solver/caas.c b/kpat/freecell-solver/caas.c
index 4d359a40..8e8f5ebb 100644
--- a/kpat/freecell-solver/caas.c
+++ b/kpat/freecell-solver/caas.c
@@ -63,7 +63,7 @@
if (hash_value_int < 0) \
{ \
/* \
- * This is a bit tqmask that nullifies the sign bit of the \
+ * This is a bit mask that nullifies the sign bit of the \
* number so it will always be positive \
* */ \
hash_value_int &= (~(1<<((sizeof(hash_value_int)<<3)-1))); \
@@ -92,7 +92,7 @@
if (hash_value_int < 0) \
{ \
/* \
- * This is a bit tqmask that nullifies the sign bit of the \
+ * This is a bit mask that nullifies the sign bit of the \
* number so it will always be positive \
* */ \
hash_value_int &= (~(1<<((sizeof(hash_value_int)<<3)-1))); \
@@ -333,7 +333,7 @@ static GCC_INLINE void freecell_solver_cache_stacks(
if (hash_value_int < 0)
{
/*
- * This is a bit tqmask that nullifies the sign bit of the
+ * This is a bit mask that nullifies the sign bit of the
* number so it will always be positive
* */
hash_value_int &= (~(1<<((sizeof(hash_value_int)<<3)-1)));
@@ -437,7 +437,7 @@ void freecell_solver_cache_talon(
if (hash_value_int < 0)
{
/*
- * This is a bit tqmask that nullifies the sign bit of the
+ * This is a bit mask that nullifies the sign bit of the
* number so it will always be positive
* */
hash_value_int &= (~(1<<((sizeof(hash_value_int)<<3)-1)));
@@ -529,9 +529,9 @@ GCC_INLINE int freecell_solver_check_and_add_state(
if (check)
{
/* The new state was not found in the cache, and it was already inserted */
- if (new_state->tqparent)
+ if (new_state->parent)
{
- new_state->tqparent->num_active_tqchildren++;
+ new_state->parent->num_active_tqchildren++;
}
instance->num_states_in_collection++;
diff --git a/kpat/freecell-solver/fcs.h b/kpat/freecell-solver/fcs.h
index b865a3f0..63db42a6 100644
--- a/kpat/freecell-solver/fcs.h
+++ b/kpat/freecell-solver/fcs.h
@@ -170,7 +170,7 @@ typedef struct freecell_solver_instance
* The debug_iter_output variables provide a programmer programmable way
* to debug the algorithm while it is running. This works well for DFS
* and Soft-DFS scans but at present support for A* and BFS is not
- * too good, as its hard to tell which state came from which tqparent state.
+ * too good, as its hard to tell which state came from which parent state.
*
* debug_iter_output is a flag that indicates whether to use this feature
* at all.
diff --git a/kpat/freecell-solver/fcs_hash.c b/kpat/freecell-solver/fcs_hash.c
index 2ae2d60b..fde7a03f 100644
--- a/kpat/freecell-solver/fcs_hash.c
+++ b/kpat/freecell-solver/fcs_hash.c
@@ -53,7 +53,7 @@ SFO_hash_t * freecell_solver_hash_init(
hash = (SFO_hash_t *)malloc(sizeof(SFO_hash_t));
hash->size = size;
- hash->size_bittqmask = size-1;
+ hash->size_bitmask = size-1;
hash->num_elems = 0;
@@ -87,7 +87,7 @@ void * freecell_solver_hash_insert(
SFO_hash_symlink_item_t * item, * last_item;
/* Get the index of the appropriate chain in the hash table */
- place = hash_value & (hash->size_bittqmask);
+ place = hash_value & (hash->size_bitmask);
list = &(hash->entries[place]);
/* If first_item is non-existent */
@@ -220,7 +220,7 @@ static void SFO_hash_rehash(
SFO_hash_t * hash
)
{
- int old_size, new_size, new_size_bittqmask;
+ int old_size, new_size, new_size_bitmask;
int i;
#if 0
SFO_hash_t * new_hash;
@@ -242,7 +242,7 @@ static void SFO_hash_rehash(
old_size = hash->size;
new_size = old_size << 1;
- new_size_bittqmask = new_size - 1;
+ new_size_bitmask = new_size - 1;
new_entries = calloc(new_size, sizeof(SFO_hash_symlink_t));
@@ -254,7 +254,7 @@ static void SFO_hash_rehash(
while(item != NULL)
{
/* The place in the new hash table */
- place = item->hash_value & new_size_bittqmask;
+ place = item->hash_value & new_size_bitmask;
/* Store the next item in the linked list in a safe place,
so we can retrieve it after the assignment */
@@ -280,7 +280,7 @@ static void SFO_hash_rehash(
#endif
hash->entries = new_entries;
hash->size = new_size;
- hash->size_bittqmask = new_size_bittqmask;
+ hash->size_bitmask = new_size_bitmask;
}
#else
diff --git a/kpat/freecell-solver/fcs_hash.h b/kpat/freecell-solver/fcs_hash.h
index 77d746f0..fbe6c78c 100644
--- a/kpat/freecell-solver/fcs_hash.h
+++ b/kpat/freecell-solver/fcs_hash.h
@@ -53,8 +53,8 @@ struct SFO_hash_struct
/* The size of the hash table */
int size;
- /* A bit tqmask that extract the lowest bits out of the hash value */
- int size_bittqmask;
+ /* A bit mask that extract the lowest bits out of the hash value */
+ int size_bitmask;
/* The number of elements stored inside the hash */
int num_elems;
/* A context to pass to the comparison function */
diff --git a/kpat/freecell-solver/freecell.c b/kpat/freecell-solver/freecell.c
index fca09078..159772ff 100644
--- a/kpat/freecell-solver/freecell.c
+++ b/kpat/freecell-solver/freecell.c
@@ -243,7 +243,7 @@ int freecell_solver_sfs_move_freecell_cards_on_top_of_stacks(
{
src_card = fcs_freecell_card(state, fc);
- /* If the freecell is not empty and dest_card is its tqparent
+ /* If the freecell is not empty and dest_card is its parent
* */
if ( (fcs_card_card_num(src_card) != 0) &&
fcs_is_parent_card(src_card,dest_card) )
@@ -533,7 +533,7 @@ int freecell_solver_sfs_move_stack_cards_to_a_parent_on_the_same_stack(
sequences_are_built_by = instance->sequences_are_built_by;
/*
- * Now let's try to move a stack card to a tqparent card which is found
+ * Now let's try to move a stack card to a parent card which is found
* on the same stack.
* */
for (stack=0;stack<state_stacks_num;stack++)
@@ -547,7 +547,7 @@ int freecell_solver_sfs_move_stack_cards_to_a_parent_on_the_same_stack(
card = fcs_stack_card(state, stack, c);
- /* Do not move cards that are already found above a suitable tqparent */
+ /* Do not move cards that are already found above a suitable parent */
a = 1;
if (c != 0)
{
@@ -1368,7 +1368,7 @@ int freecell_solver_sfs_move_cards_to_a_different_parent(
fcs_move_init(temp_move);
- /* This time try to move cards that are already on top of a tqparent to a different tqparent */
+ /* This time try to move cards that are already on top of a parent to a different parent */
for (stack=0;stack<state_stacks_num;stack++)
{
@@ -1398,7 +1398,7 @@ int freecell_solver_sfs_move_cards_to_a_different_parent(
card = fcs_stack_card(state, stack, c);
- /* Do not move cards that are already found above a suitable tqparent */
+ /* Do not move cards that are already found above a suitable parent */
a = 1;
if (c != 0)
{
@@ -1697,7 +1697,7 @@ int freecell_solver_sfs_yukon_move_card_to_parent(
if (fcs_is_parent_card(card, dest_card))
{
/* We can move it there - now let's check to see
- * if it is already above a suitable tqparent. */
+ * if it is already above a suitable parent. */
if ((c == 0) ||
(! fcs_is_parent_card(card, fcs_stack_card(state, stack, c-1))))
{
diff --git a/kpat/freecell-solver/intrface.c b/kpat/freecell-solver/intrface.c
index 44aa29a0..9fb09840 100644
--- a/kpat/freecell-solver/intrface.c
+++ b/kpat/freecell-solver/intrface.c
@@ -796,7 +796,7 @@ static void trace_solution(
s1 = instance->final_state;
/* Retrace the step from the current state to its parents */
- while (s1->tqparent != NULL)
+ while (s1->parent != NULL)
{
/* Mark the state as part of the non-optimized solution */
s1->visited |= FCS_VISITED_IN_SOLUTION_PATH;
@@ -811,8 +811,8 @@ static void trace_solution(
}
/* Duplicate the state to a freshly malloced memory */
- /* Move to the tqparent state */
- s1 = s1->tqparent;
+ /* Move to the parent state */
+ s1 = s1->parent;
}
/* There's one more state than there are move stacks */
s1->visited |= FCS_VISITED_IN_SOLUTION_PATH;
@@ -915,7 +915,7 @@ int freecell_solver_solve_instance(
state_copy_ptr->depth = 0;
state_copy_ptr->moves_to_parent = NULL;
state_copy_ptr->visited = 0;
- state_copy_ptr->tqparent = NULL;
+ state_copy_ptr->parent = NULL;
memset(&(state_copy_ptr->scan_visited), '\0', sizeof(state_copy_ptr->scan_visited));
instance->state_copy_ptr = state_copy_ptr;
diff --git a/kpat/freecell-solver/lookup2.c b/kpat/freecell-solver/lookup2.c
index c5886304..6ab9ae7e 100644
--- a/kpat/freecell-solver/lookup2.c
+++ b/kpat/freecell-solver/lookup2.c
@@ -19,7 +19,7 @@ Note:
#define hashsize(n) ((ub4)1<<(n))
-#define hashtqmask(n) (hashsize(n)-1)
+#define hashmask(n) (hashsize(n)-1)
/*
--------------------------------------------------------------------
diff --git a/kpat/freecell-solver/main.c b/kpat/freecell-solver/main.c
index 181039b6..4a47f300 100644
--- a/kpat/freecell-solver/main.c
+++ b/kpat/freecell-solver/main.c
@@ -169,8 +169,8 @@ help_screen_t help_screens[] = {
"-snx --standard-notation-extended\n"
" Display the moves in extended standard notation while specifying the\n"
" number of cards moved if applicable\n"
-"-pi --display-tqparent-iter \n"
-" Display the index of the tqparent iteration of each state in the\n"
+"-pi --display-parent-iter \n"
+" Display the index of the parent iteration of each state in the\n"
" run-time dump.\n"
"\n"
"--freecells-num [Freecells\' Number]\n"
@@ -227,33 +227,33 @@ help_screen_t help_screens[] = {
" '2' - put freecell cards on top of stacks.\n"
" '3' - put non-top stack cards in the foundations.\n"
" '4' - move stack cards to different stacks.\n"
-" '5' - move stack cards to a tqparent card on the same stack.\n"
+" '5' - move stack cards to a parent card on the same stack.\n"
" '6' - move sequences of cards onto free stacks.\n"
" '7' - put freecell cards on empty stacks.\n"
-" '8' - move cards to a different tqparent.\n"
+" '8' - move cards to a different parent.\n"
" '9' - empty an entire stack into the freecells.\n"
"\n"
" Atomic Freecell Tests:\n"
"\n"
" 'A' - move a stack card to an empty stack.\n"
-" 'B' - move a stack card to a tqparent on a different stack.\n"
+" 'B' - move a stack card to a parent on a different stack.\n"
" 'C' - move a stack card to a freecell.\n"
-" 'D' - move a freecel card to a tqparent.\n"
+" 'D' - move a freecel card to a parent.\n"
" 'E' - move a freecel card to an empty stack.\n"
"\n"
" Simple Simon Tests:\n"
"\n"
" 'a' - move a full sequence to the foundations.\n"
-" 'b' - move a sequence to a true tqparent of his.\n"
-" 'c' - move a whole stack sequence to a false tqparent (in order to\n"
+" 'b' - move a sequence to a true parent of his.\n"
+" 'c' - move a whole stack sequence to a false parent (in order to\n"
" clear the stack)\n"
-" 'd' - move a sequence to a true tqparent that has some cards above it.\n"
-" 'e' - move a sequence with some cards above it to a true tqparent.\n"
-" 'f' - move a sequence with a junk sequence above it to a true tqparent\n"
+" 'd' - move a sequence to a true parent that has some cards above it.\n"
+" 'e' - move a sequence with some cards above it to a true parent.\n"
+" 'f' - move a sequence with a junk sequence above it to a true parent\n"
" that has some cards above it.\n"
-" 'g' - move a whole stack sequence to a false tqparent which has some\n"
+" 'g' - move a whole stack sequence to a false parent which has some\n"
" cards above it.\n"
-" 'h' - move a sequence to a tqparent on the same stack.\n"
+" 'h' - move a sequence to a parent on the same stack.\n"
"\n"
" Tests are grouped with parenthesis or square brackets. Each group\n"
" will be randomized as a whole by the random-dfs scan.\n"
@@ -313,7 +313,7 @@ help_screen_t help_screens[] = {
"\n"
"\n"
"--reparent-states\n"
-" Retqparent states that have a larger depth than that of the state\n"
+" Reparent states that have a larger depth than that of the state\n"
" from which they were reached a posteriori.\n"
"--calc-real-depth\n"
" If --reparent-states is enabled, then explictly calculate the real\n"
@@ -498,7 +498,7 @@ static int cmd_line_callback(
dc->display_moves = 1;
dc->display_states = 1;
}
- else if ((!strcmp(argv[arg], "-pi")) || (!strcmp(argv[arg], "--display-tqparent-iter")))
+ else if ((!strcmp(argv[arg], "-pi")) || (!strcmp(argv[arg], "--display-parent-iter")))
{
dc->display_parent_iter_num = 1;
}
@@ -588,7 +588,7 @@ static char * known_parameters[] = {
"-sn", "--standard-notation",
"-snx", "--standard-notation-extended",
"-sam", "--display-states-and-moves",
- "-pi", "--display-tqparent-iter",
+ "-pi", "--display-parent-iter",
"--reset",
NULL
};
diff --git a/kpat/freecell-solver/pqueue.c b/kpat/freecell-solver/pqueue.c
index 7cacf8ff..90afc168 100644
--- a/kpat/freecell-solver/pqueue.c
+++ b/kpat/freecell-solver/pqueue.c
@@ -73,7 +73,7 @@ int freecell_solver_PQueuePush( PTQUEUE *pq, void *item, pq_rating_t r)
i = (++CurrentSize);
- /* while the tqparent of the space we're putting the new node into is worse than
+ /* while the parent of the space we're putting the new node into is worse than
our new node, swap the space with the worse node. We keep doing that until we
get to a worse node or until we get to the top
diff --git a/kpat/freecell-solver/pqueue.h b/kpat/freecell-solver/pqueue.h
index d4cfd7a3..875741ae 100644
--- a/kpat/freecell-solver/pqueue.h
+++ b/kpat/freecell-solver/pqueue.h
@@ -43,7 +43,7 @@ typedef struct _PTQUEUE
/* given an index to any element in a binary tree stored in a linear array with the root at 1 and
a "sentinel" value at 0 these macros are useful in making the code clearer */
-/* the tqparent is always given by index/2 */
+/* the parent is always given by index/2 */
#define PTQ_PARENT_INDEX(i) ((i)>>1)
#define PTQ_FIRST_ENTRY (1)
diff --git a/kpat/freecell-solver/scans.c b/kpat/freecell-solver/scans.c
index 31a5dd18..a4368873 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->tqparent = NULL;
+ ptr_state_with_locations_orig->parent = 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->tqparent = ptr_state_with_locations;
+ ptr_recurse_into_state_with_locations->parent = ptr_state_with_locations;
#endif
/*
@@ -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->tqparent = NULL;
+ ptr_state_with_locations_orig->parent = 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->tqparent == NULL) ?
+ ((ptr_state_with_locations->parent == NULL) ?
0 :
- ptr_state_with_locations->tqparent->visited_iter
+ ptr_state_with_locations->parent->visited_iter
)
);
}
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++
diff --git a/kpat/freecell-solver/state.h b/kpat/freecell-solver/state.h
index 7b312b42..302d6d9a 100644
--- a/kpat/freecell-solver/state.h
+++ b/kpat/freecell-solver/state.h
@@ -72,7 +72,7 @@ struct fcs_struct_state_with_locations_t
fcs_state_t s;
int stack_locs[MAX_NUM_STACKS];
int fc_locs[MAX_NUM_FREECELLS];
- struct fcs_struct_state_with_locations_t * tqparent;
+ struct fcs_struct_state_with_locations_t * parent;
fcs_move_stack_t * moves_to_parent;
int depth;
int visited;
@@ -232,7 +232,7 @@ struct fcs_struct_state_with_locations_t
fcs_state_t s;
char stack_locs[MAX_NUM_STACKS];
char fc_locs[MAX_NUM_FREECELLS];
- struct fcs_struct_state_with_locations_t * tqparent;
+ struct fcs_struct_state_with_locations_t * parent;
fcs_move_stack_t * moves_to_parent;
int depth;
int visited;
@@ -484,7 +484,7 @@ struct fcs_struct_state_with_locations_t
fcs_state_t s;
fcs_locs_t stack_locs[MAX_NUM_STACKS];
fcs_locs_t fc_locs[MAX_NUM_FREECELLS];
- struct fcs_struct_state_with_locations_t * tqparent;
+ struct fcs_struct_state_with_locations_t * parent;
fcs_move_stack_t * moves_to_parent;
int depth;
/*
diff --git a/kpat/freecell-solver/test_arr.h b/kpat/freecell-solver/test_arr.h
index 821ccd98..911ff511 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 tqparent.
+ * This macro determines if child can be placed above parent.
*
* 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, tqparent) \
- ((fcs_card_card_num(child)+1 == fcs_card_card_num(tqparent)) && \
+#define fcs_is_parent_card(child, parent) \
+ ((fcs_card_card_num(child)+1 == fcs_card_card_num(parent)) && \
((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(tqparent)) : \
- ((fcs_card_suit(child) & 0x1) != (fcs_card_suit(tqparent)&0x1)) \
+ (fcs_card_suit(child) == fcs_card_suit(parent)) : \
+ ((fcs_card_suit(child) & 0x1) != (fcs_card_suit(parent)&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->tqparent; \
+ ptr_state = ptr_state->parent; \
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->tqparent; \
+ ptr_state = ptr_state->parent; \
} \
} \
} \
/*
* This macro marks a state as a dead end, and afterwards propogates
- * this information to its tqparent and ancestor states.
+ * this information to its parent and ancestor states.
* */
#define mark_as_dead_end(ptr_state_input) \
{ \
@@ -84,7 +84,7 @@ 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->tqparent; \
+ ptr_state = ptr_state->parent; \
if (ptr_state != NULL) \
{ \
/* Decrease the refcount of the state */ \
@@ -93,8 +93,8 @@ extern freecell_solver_solve_for_state_test_t freecell_solver_sfs_tests[FCS_TEST
{ \
/* Mark as dead end */ \
ptr_state->visited |= FCS_VISITED_DEAD_END; \
- /* Go to its tqparent state */ \
- ptr_state = ptr_state->tqparent; \
+ /* Go to its parent state */ \
+ ptr_state = ptr_state->parent; \
if (ptr_state == NULL) \
{ \
break; \
diff --git a/kpat/freecell-solver/tests.h b/kpat/freecell-solver/tests.h
index fbf78262..0293ed85 100644
--- a/kpat/freecell-solver/tests.h
+++ b/kpat/freecell-solver/tests.h
@@ -58,7 +58,7 @@ extern "C" {
/* Some A* and BFS parameters that need to be initialized in \
* the derived state. \
* */ \
- ptr_new_state_with_locations->tqparent = ptr_state_with_locations; \
+ ptr_new_state_with_locations->parent = ptr_state_with_locations; \
ptr_new_state_with_locations->moves_to_parent = moves; \
/* Make sure depth is consistent with the game graph. \
* I.e: the depth of every newly discovered state is derived from \
@@ -103,11 +103,11 @@ fcs_move_stack_push(moves, temp_move); \
{ \
fcs_state_ia_release(hard_thread); \
calculate_real_depth(existing_state); \
- /* Re-tqparent the existing state to this one. \
+ /* Re-parent the existing state to this one. \
* \
* What it means is that if the depth of the state if it \
* can be reached from this one is lower than what it \
- * already have, then re-assign its tqparent to this state. \
+ * already have, then re-assign its parent to this state. \
* */ \
if (reparent && \
(existing_state->depth > ptr_state_with_locations->depth+1)) \
@@ -119,15 +119,15 @@ fcs_move_stack_push(moves, temp_move); \
); \
if (!(existing_state->visited & FCS_VISITED_DEAD_END)) \
{ \
- if ((--existing_state->tqparent->num_active_tqchildren) == 0) \
+ if ((--existing_state->parent->num_active_tqchildren) == 0) \
{ \
mark_as_dead_end( \
- existing_state->tqparent \
+ existing_state->parent \
); \
} \
ptr_state_with_locations->num_active_tqchildren++; \
} \
- existing_state->tqparent = ptr_state_with_locations; \
+ existing_state->parent = ptr_state_with_locations; \
existing_state->depth = ptr_state_with_locations->depth + 1; \
} \
fcs_derived_states_list_add_state( \
diff --git a/kpat/freecell.cpp b/kpat/freecell.cpp
index 9e67633a..74d00b68 100644
--- a/kpat/freecell.cpp
+++ b/kpat/freecell.cpp
@@ -49,8 +49,8 @@ void FreecellPile::moveCards(CardList &c, Pile *to)
//-------------------------------------------------------------------------//
FreecellBase::FreecellBase( int decks, int stores, int freecells, int fill, bool unlimit,
- KMainWindow* tqparent, const char* name)
- : Dealer(tqparent,name),
+ KMainWindow* parent, const char* name)
+ : Dealer(parent,name),
solver_instance(0), es_filling(fill), solver_ret(FCS_STATE_NOT_BEGAN_YET),
unlimited_move(unlimit)
{
@@ -813,12 +813,12 @@ bool FreecellBase::checkRemove(int checkIndex, const Pile *p, const Card *c) con
class Freecell : public FreecellBase
{
public:
- Freecell( KMainWindow* tqparent=0, const char* name=0);
+ Freecell( KMainWindow* parent=0, const char* name=0);
virtual void deal();
};
-Freecell::Freecell( KMainWindow* tqparent, const char* name)
- : FreecellBase(1, 8, 4, FCS_ES_FILLED_BY_ANY_CARD, false, tqparent, name)
+Freecell::Freecell( KMainWindow* parent, const char* name)
+ : FreecellBase(1, 8, 4, FCS_ES_FILLED_BY_ANY_CARD, false, parent, name)
{
for (int i = 0; i < 8; i++)
store[i]->move(8 + ( cardMap::CARDX() * 11 / 10 + 1 ) * i, 8 + cardMap::CARDY() * 11 / 10);
@@ -846,7 +846,7 @@ static class LocalDealerInfo3 : public DealerInfo
{
public:
LocalDealerInfo3() : DealerInfo(I18N_NOOP("&Freecell"), 3) {}
- virtual Dealer *createGame(KMainWindow *tqparent) { return new Freecell(tqparent); }
+ virtual Dealer *createGame(KMainWindow *parent) { return new Freecell(parent); }
} ldi8;
//-------------------------------------------------------------------------//
diff --git a/kpat/freecell.h b/kpat/freecell.h
index 5d354eda..5b769249 100644
--- a/kpat/freecell.h
+++ b/kpat/freecell.h
@@ -27,7 +27,7 @@
class FreecellPile : public Pile
{
public:
- FreecellPile(int _index, Dealer* tqparent = 0) : Pile(_index, tqparent) {}
+ FreecellPile(int _index, Dealer* parent = 0) : Pile(_index, parent) {}
virtual void moveCards(CardList &c, Pile *to);
};
@@ -38,7 +38,7 @@ class FreecellBase : public Dealer
public:
FreecellBase( int decks, int stores, int freecells, int es_filling, bool unlimited_move,
- KMainWindow* tqparent=0, const char* name=0);
+ KMainWindow* parent=0, const char* name=0);
void moveCards(CardList &c, FreecellPile *from, Pile *to);
TQString solverFormat() const;
virtual ~FreecellBase();
diff --git a/kpat/golf.cpp b/kpat/golf.cpp
index b06caf68..053525da 100644
--- a/kpat/golf.cpp
+++ b/kpat/golf.cpp
@@ -4,8 +4,8 @@
#include <kdebug.h>
#include "cardmaps.h"
-HorRightPile::HorRightPile( int _index, Dealer* tqparent)
- : Pile(_index, tqparent)
+HorRightPile::HorRightPile( int _index, Dealer* parent)
+ : Pile(_index, parent)
{
}
@@ -19,8 +19,8 @@ TQSize HorRightPile::cardOffset( bool _spread, bool, const Card *) const
//-------------------------------------------------------------------------//
-Golf::Golf( KMainWindow* tqparent, const char* _name)
- : Dealer( tqparent, _name )
+Golf::Golf( KMainWindow* parent, const char* _name)
+ : Dealer( parent, _name )
{
const int dist_x = cardMap::CARDX() * 11 / 10 + 1;
const int pile_dist = 10 + 3 * cardMap::CARDY();
@@ -158,7 +158,7 @@ static class LocalDealerInfo13 : public DealerInfo
{
public:
LocalDealerInfo13() : DealerInfo(I18N_NOOP("Go&lf"), 12) {}
- virtual Dealer *createGame(KMainWindow *tqparent) { return new Golf(tqparent); }
+ virtual Dealer *createGame(KMainWindow *parent) { return new Golf(parent); }
} ldi13;
//-------------------------------------------------------------------------//
diff --git a/kpat/golf.h b/kpat/golf.h
index 275cd8b5..68937eb0 100644
--- a/kpat/golf.h
+++ b/kpat/golf.h
@@ -9,7 +9,7 @@ class HorRightPile : public Pile
TQ_OBJECT
public:
- HorRightPile( int _index, Dealer* tqparent = 0);
+ HorRightPile( int _index, Dealer* parent = 0);
virtual TQSize cardOffset( bool _spread, bool _facedown, const Card *before) const;
};
@@ -19,7 +19,7 @@ class Golf : public Dealer
TQ_OBJECT
public:
- Golf( KMainWindow* tqparent=0, const char* name=0);
+ Golf( KMainWindow* parent=0, const char* name=0);
void deal();
virtual void restart();
virtual bool isGameLost() const;
diff --git a/kpat/grandf.cpp b/kpat/grandf.cpp
index 5ada2ea6..c15c6103 100644
--- a/kpat/grandf.cpp
+++ b/kpat/grandf.cpp
@@ -25,8 +25,8 @@
#include <assert.h>
#include "cardmaps.h"
-Grandf::Grandf( KMainWindow* tqparent, const char *name )
- : Dealer( tqparent, name )
+Grandf::Grandf( KMainWindow* parent, const char *name )
+ : Dealer( parent, name )
{
deck = Deck::new_deck(this);
deck->hide();
@@ -221,7 +221,7 @@ static class LocalDealerInfo1 : public DealerInfo
{
public:
LocalDealerInfo1() : DealerInfo(I18N_NOOP("&Grandfather"), 1) {}
- virtual Dealer *createGame(KMainWindow *tqparent) { return new Grandf(tqparent); }
+ virtual Dealer *createGame(KMainWindow *parent) { return new Grandf(parent); }
} gfdi;
#include "grandf.moc"
diff --git a/kpat/grandf.h b/kpat/grandf.h
index 24e64c5c..e2ff1939 100644
--- a/kpat/grandf.h
+++ b/kpat/grandf.h
@@ -39,7 +39,7 @@ class Grandf : public Dealer {
TQ_OBJECT
public:
- Grandf( KMainWindow* tqparent=0, const char* name=0);
+ Grandf( KMainWindow* parent=0, const char* name=0);
public slots:
void redeal();
diff --git a/kpat/gypsy.cpp b/kpat/gypsy.cpp
index 9c37b6b6..5432336a 100644
--- a/kpat/gypsy.cpp
+++ b/kpat/gypsy.cpp
@@ -3,8 +3,8 @@
#include "deck.h"
#include "cardmaps.h"
-Gypsy::Gypsy( KMainWindow* tqparent, const char *name )
- : Dealer( tqparent, name )
+Gypsy::Gypsy( KMainWindow* parent, const char *name )
+ : Dealer( parent, name )
{
const int dist_x = cardMap::CARDX() * 11 / 10 + 1;
const int dist_y = cardMap::CARDY() * 11 / 10 + 1;
@@ -111,7 +111,7 @@ static class LocalDealerInfo7 : public DealerInfo
{
public:
LocalDealerInfo7() : DealerInfo(I18N_NOOP("Gy&psy"), 7) {}
- virtual Dealer *createGame(KMainWindow *tqparent) { return new Gypsy(tqparent); }
+ virtual Dealer *createGame(KMainWindow *parent) { return new Gypsy(parent); }
} gyfdi;
#include "gypsy.moc"
diff --git a/kpat/gypsy.h b/kpat/gypsy.h
index 5ead4175..90adff42 100644
--- a/kpat/gypsy.h
+++ b/kpat/gypsy.h
@@ -14,7 +14,7 @@ class Gypsy : public Dealer {
TQ_OBJECT
public:
- Gypsy( KMainWindow* tqparent=0, const char* name=0);
+ Gypsy( KMainWindow* parent=0, const char* name=0);
virtual bool isGameLost() const;
public slots:
diff --git a/kpat/idiot.cpp b/kpat/idiot.cpp
index e86e8059..3ac49ef5 100644
--- a/kpat/idiot.cpp
+++ b/kpat/idiot.cpp
@@ -25,8 +25,8 @@
#include "cardmaps.h"
-Idiot::Idiot( KMainWindow* tqparent, const char* _name)
- : Dealer( tqparent, _name )
+Idiot::Idiot( KMainWindow* parent, const char* _name)
+ : Dealer( parent, _name )
{
// Create the deck to the left.
m_deck = Deck::new_deck( this );
@@ -227,7 +227,7 @@ static class LocalDealerInfo2 : public DealerInfo
{
public:
LocalDealerInfo2() : DealerInfo(I18N_NOOP("&Aces Up"), 2) {}
- virtual Dealer *createGame(KMainWindow *tqparent) { return new Idiot(tqparent); }
+ virtual Dealer *createGame(KMainWindow *parent) { return new Idiot(parent); }
} ldi4;
diff --git a/kpat/idiot.h b/kpat/idiot.h
index 147e2fec..21d68b88 100644
--- a/kpat/idiot.h
+++ b/kpat/idiot.h
@@ -33,7 +33,7 @@ class Idiot: public Dealer
public:
- Idiot( KMainWindow* tqparent = 0, const char* name = 0 );
+ Idiot( KMainWindow* parent = 0, const char* name = 0 );
virtual bool isGameWon() const;
diff --git a/kpat/kings.cpp b/kpat/kings.cpp
index 22faf307..7654a88f 100644
--- a/kpat/kings.cpp
+++ b/kpat/kings.cpp
@@ -6,8 +6,8 @@
#include "freecell-solver/fcs_enums.h"
#include "cardmaps.h"
-Kings::Kings( KMainWindow* tqparent, const char *name )
- : FreecellBase( 2, 8, 8, FCS_ES_FILLED_BY_KINGS_ONLY, true, tqparent, name )
+Kings::Kings( KMainWindow* parent, const char *name )
+ : FreecellBase( 2, 8, 8, FCS_ES_FILLED_BY_KINGS_ONLY, true, parent, name )
{
const int dist_x = cardMap::CARDX() * 11 / 10 + 1;
@@ -125,7 +125,7 @@ static class LocalDealerInfo12 : public DealerInfo
{
public:
LocalDealerInfo12() : DealerInfo(I18N_NOOP("&The Kings"), 12) {}
- virtual Dealer *createGame(KMainWindow *tqparent) { return new Kings(tqparent); }
+ virtual Dealer *createGame(KMainWindow *parent) { return new Kings(parent); }
} gfdi12;
#endif
diff --git a/kpat/kings.h b/kpat/kings.h
index dc49e8c3..10afa8d6 100644
--- a/kpat/kings.h
+++ b/kpat/kings.h
@@ -12,7 +12,7 @@ class Kings : public FreecellBase {
TQ_OBJECT
public:
- Kings( KMainWindow* tqparent=0, const char* name=0);
+ Kings( KMainWindow* parent=0, const char* name=0);
virtual bool isGameLost() const;
public slots:
diff --git a/kpat/klondike.cpp b/kpat/klondike.cpp
index 93514d2f..dcf4c1f8 100644
--- a/kpat/klondike.cpp
+++ b/kpat/klondike.cpp
@@ -32,8 +32,8 @@
class KlondikePile : public Pile
{
public:
- KlondikePile( int _index, Dealer* tqparent)
- : Pile(_index, tqparent) {}
+ KlondikePile( int _index, Dealer* parent)
+ : Pile(_index, parent) {}
void clearSpread() { cardlist.clear(); }
@@ -50,8 +50,8 @@ private:
CardList cardlist;
};
-Klondike::Klondike( bool easy, KMainWindow* tqparent, const char* _name )
- : Dealer( tqparent, _name )
+Klondike::Klondike( bool easy, KMainWindow* parent, const char* _name )
+ : Dealer( parent, _name )
{
// The units of the follwoing constants are pixels
const int margin = 10; // between card piles and board edge
@@ -481,14 +481,14 @@ static class LocalDealerInfo0 : public DealerInfo
{
public:
LocalDealerInfo0() : DealerInfo(I18N_NOOP("&Klondike"), 0) {}
- virtual Dealer *createGame(KMainWindow *tqparent) { return new Klondike(true, tqparent); }
+ virtual Dealer *createGame(KMainWindow *parent) { return new Klondike(true, parent); }
} ldi0;
static class LocalDealerInfo14 : public DealerInfo
{
public:
LocalDealerInfo14() : DealerInfo(I18N_NOOP("Klondike (&draw 3)"), 13) {}
- virtual Dealer *createGame(KMainWindow *tqparent) { return new Klondike(false, tqparent); }
+ virtual Dealer *createGame(KMainWindow *parent) { return new Klondike(false, parent); }
} ldi14;
diff --git a/kpat/klondike.h b/kpat/klondike.h
index ad4fcdcd..959244ea 100644
--- a/kpat/klondike.h
+++ b/kpat/klondike.h
@@ -36,7 +36,7 @@ class Klondike : public Dealer {
TQ_OBJECT
public:
- Klondike( bool easy, KMainWindow* tqparent=0, const char* name=0);
+ Klondike( bool easy, KMainWindow* parent=0, const char* name=0);
public:
virtual void restart();
diff --git a/kpat/mod3.cpp b/kpat/mod3.cpp
index 9f92643f..45a8d026 100644
--- a/kpat/mod3.cpp
+++ b/kpat/mod3.cpp
@@ -26,8 +26,8 @@
//-------------------------------------------------------------------------//
-Mod3::Mod3( KMainWindow* tqparent, const char* _name)
- : Dealer( tqparent, _name )
+Mod3::Mod3( KMainWindow* parent, const char* _name)
+ : Dealer( parent, _name )
{
const int dist_x = cardMap::CARDX() * 11 / 10 + 1;
const int dist_y = cardMap::CARDY() * 11 / 10 + 1;
@@ -301,7 +301,7 @@ static class LocalDealerInfo5 : public DealerInfo
{
public:
LocalDealerInfo5() : DealerInfo(I18N_NOOP("M&od3"), 5) {}
- virtual Dealer *createGame(KMainWindow *tqparent) { return new Mod3(tqparent); }
+ virtual Dealer *createGame(KMainWindow *parent) { return new Mod3(parent); }
} ldi5;
//-------------------------------------------------------------------------//
diff --git a/kpat/mod3.h b/kpat/mod3.h
index cb6047ce..60b9172a 100644
--- a/kpat/mod3.h
+++ b/kpat/mod3.h
@@ -31,7 +31,7 @@ class Mod3 : public Dealer
TQ_OBJECT
public:
- Mod3( KMainWindow* tqparent=0, const char* name=0);
+ Mod3( KMainWindow* parent=0, const char* name=0);
void deal();
diff --git a/kpat/napoleon.cpp b/kpat/napoleon.cpp
index 1429fbdb..7f7c7f95 100644
--- a/kpat/napoleon.cpp
+++ b/kpat/napoleon.cpp
@@ -22,8 +22,8 @@
#include "deck.h"
#include "cardmaps.h"
-Napoleon::Napoleon( KMainWindow* tqparent, const char* _name )
- : Dealer( tqparent, _name )
+Napoleon::Napoleon( KMainWindow* parent, const char* _name )
+ : Dealer( parent, _name )
{
deck = Deck::new_deck( this );
connect(deck, TQT_SIGNAL(clicked(Card *)), TQT_SLOT(deal1(Card*)));
@@ -198,7 +198,7 @@ static class LocalDealerInfo4 : public DealerInfo
{
public:
LocalDealerInfo4() : DealerInfo(I18N_NOOP("&Napoleon's Tomb"), 4) {}
- virtual Dealer *createGame(KMainWindow *tqparent) { return new Napoleon(tqparent); }
+ virtual Dealer *createGame(KMainWindow *parent) { return new Napoleon(parent); }
} ldi3;
#include "napoleon.moc"
diff --git a/kpat/napoleon.h b/kpat/napoleon.h
index d097d6ac..dd7b9d90 100644
--- a/kpat/napoleon.h
+++ b/kpat/napoleon.h
@@ -28,7 +28,7 @@ class Napoleon : public Dealer {
Q_OBJECT
TQ_OBJECT
public:
- Napoleon (KMainWindow* tqparent=0, const char* name=0);
+ Napoleon (KMainWindow* parent=0, const char* name=0);
virtual void restart();
virtual void getHints();
diff --git a/kpat/pile.h b/kpat/pile.h
index 3580eefe..c30e7c20 100644
--- a/kpat/pile.h
+++ b/kpat/pile.h
@@ -41,7 +41,7 @@ public:
static const int autoTurnTop;
static const int wholeColumn;
- Pile( int _index, Dealer* tqparent = 0);
+ Pile( int _index, Dealer* parent = 0);
virtual ~Pile();
Dealer *dealer() const { return m_dealer; }
diff --git a/kpat/simon.cpp b/kpat/simon.cpp
index fd3c3604..287ecd00 100644
--- a/kpat/simon.cpp
+++ b/kpat/simon.cpp
@@ -5,8 +5,8 @@
#include <assert.h>
#include "cardmaps.h"
-Simon::Simon( KMainWindow* tqparent, const char *name )
- : Dealer( tqparent, name )
+Simon::Simon( KMainWindow* parent, const char *name )
+ : Dealer( parent, name )
{
deck = Deck::new_deck(this);
deck->move(10, 10);
@@ -150,7 +150,7 @@ static class LocalDealerInfo9 : public DealerInfo
{
public:
LocalDealerInfo9() : DealerInfo(I18N_NOOP("&Simple Simon"), 9) {}
- virtual Dealer *createGame(KMainWindow *tqparent) { return new Simon(tqparent); }
+ virtual Dealer *createGame(KMainWindow *parent) { return new Simon(parent); }
} gfi9;
#include "simon.moc"
diff --git a/kpat/simon.h b/kpat/simon.h
index b20bfde8..14eefa20 100644
--- a/kpat/simon.h
+++ b/kpat/simon.h
@@ -8,7 +8,7 @@ class Simon : public Dealer {
TQ_OBJECT
public:
- Simon( KMainWindow* tqparent=0, const char* name=0);
+ Simon( KMainWindow* parent=0, const char* name=0);
public slots:
void deal();
diff --git a/kpat/spider.cpp b/kpat/spider.cpp
index 5c367c04..c8e6abc5 100644
--- a/kpat/spider.cpp
+++ b/kpat/spider.cpp
@@ -48,8 +48,8 @@ void SpiderPile::moveCards(CardList &c, Pile *to)
//-------------------------------------------------------------------------//
-Spider::Spider(int suits, KMainWindow* tqparent, const char* _name)
- : Dealer(tqparent, _name)
+Spider::Spider(int suits, KMainWindow* parent, const char* _name)
+ : Dealer(parent, _name)
{
const int dist_x = cardMap::CARDX() * 11 / 10 + 1;
const int dist_y = cardMap::CARDY() * 11 / 10 + 1;
@@ -459,21 +459,21 @@ static class LocalDealerInfo15 : public DealerInfo
{
public:
LocalDealerInfo15() : DealerInfo(I18N_NOOP("S&pider (Easy)"), 14) {}
- virtual Dealer *createGame(KMainWindow *tqparent) { return new Spider(1, tqparent); }
+ virtual Dealer *createGame(KMainWindow *parent) { return new Spider(1, parent); }
} ldi15;
static class LocalDealerInfo16 : public DealerInfo
{
public:
LocalDealerInfo16() : DealerInfo(I18N_NOOP("Spider (&Medium)"), 15) {}
- virtual Dealer *createGame(KMainWindow *tqparent) { return new Spider(2, tqparent); }
+ virtual Dealer *createGame(KMainWindow *parent) { return new Spider(2, parent); }
} ldi16;
static class LocalDealerInfo17 : public DealerInfo
{
public:
LocalDealerInfo17() : DealerInfo(I18N_NOOP("Spider (&Hard)"), 16) {}
- virtual Dealer *createGame(KMainWindow *tqparent) { return new Spider(4, tqparent); }
+ virtual Dealer *createGame(KMainWindow *parent) { return new Spider(4, parent); }
} ldi17;
//-------------------------------------------------------------------------//
diff --git a/kpat/spider.h b/kpat/spider.h
index 81bf84b2..a3b591a6 100644
--- a/kpat/spider.h
+++ b/kpat/spider.h
@@ -26,7 +26,7 @@
class SpiderPile : public Pile
{
public:
- SpiderPile(int _index, Dealer* tqparent = 0) : Pile(_index, tqparent) {}
+ SpiderPile(int _index, Dealer* parent = 0) : Pile(_index, parent) {}
virtual void moveCards(CardList &c, Pile *to);
CardList getRun();
};
@@ -37,7 +37,7 @@ class Spider : public Dealer
TQ_OBJECT
public:
- Spider(int suits, KMainWindow *tqparent=0, const char *name=0);
+ Spider(int suits, KMainWindow *parent=0, const char *name=0);
void deal();
void dealRow();
void checkPileDeck(Pile *to);
diff --git a/kpat/yukon.cpp b/kpat/yukon.cpp
index 1d3a6157..859b3746 100644
--- a/kpat/yukon.cpp
+++ b/kpat/yukon.cpp
@@ -5,8 +5,8 @@
#include <assert.h>
#include "cardmaps.h"
-Yukon::Yukon( KMainWindow* tqparent, const char *name )
- : Dealer( tqparent, name )
+Yukon::Yukon( KMainWindow* parent, const char *name )
+ : Dealer( parent, name )
{
const int dist_x = cardMap::CARDX() * 11 / 10 + 1;
const int dist_y = cardMap::CARDY() * 11 / 10 + 1;
@@ -124,7 +124,7 @@ static class LocalDealerInfo10 : public DealerInfo
{
public:
LocalDealerInfo10() : DealerInfo(I18N_NOOP("&Yukon"), 10) {}
- virtual Dealer *createGame(KMainWindow *tqparent) { return new Yukon(tqparent); }
+ virtual Dealer *createGame(KMainWindow *parent) { return new Yukon(parent); }
} gfi10;
#include "yukon.moc"
diff --git a/kpat/yukon.h b/kpat/yukon.h
index c9b4e5c9..dbfcea6f 100644
--- a/kpat/yukon.h
+++ b/kpat/yukon.h
@@ -8,7 +8,7 @@ class Yukon : public Dealer {
TQ_OBJECT
public:
- Yukon( KMainWindow* tqparent=0, const char* name=0);
+ Yukon( KMainWindow* parent=0, const char* name=0);
virtual bool isGameLost() const;
public slots: