summaryrefslogtreecommitdiffstats
path: root/ksnake/board.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ksnake/board.cpp')
-rw-r--r--ksnake/board.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/ksnake/board.cpp b/ksnake/board.cpp
index 0959dee1..e9e44cd0 100644
--- a/ksnake/board.cpp
+++ b/ksnake/board.cpp
@@ -48,7 +48,7 @@ int Pos::price() const {
void Pos::setParent(Pos *p) {
_parent = p;
}
-Pos *Pos::parent() const {
+Pos *Pos::tqparent() const {
return(_parent);
}
Pos *Pos::listNext() {
@@ -241,7 +241,7 @@ int Board::getNextCloseTo(int s, int d, bool diag, int lastIndex)
if(list->index() == d) {
// Find first movement after root.
for(; ; list = p) {
- p = list->parent();
+ p = list->tqparent();
if(p == root) {
// This is our move.
int nextSq = list->index();
@@ -265,7 +265,7 @@ int Board::getNextCloseTo(int s, int d, bool diag, int lastIndex)
continue;
}
- int pi = list->parent() ? list->parent()->index() : lastIndex;
+ int pi = list->tqparent() ? list->tqparent()->index() : lastIndex;
if(pi != -1 && direction(pi, list->index()) !=
direction(list->index(), i)) {
pri += 10;
@@ -277,7 +277,7 @@ int Board::getNextCloseTo(int s, int d, bool diag, int lastIndex)
// Check price of found position with current one.
if(p->price() > pri) {
// We found a cheapear way to reach the same
- // place, so let's change the parent and price of p.
+ // place, so let's change the tqparent and price of p.
p->setPrice(list->price() + 1);
p->setParent(list);
list->addList(p);