diff options
Diffstat (limited to 'ksnake/board.cpp')
-rw-r--r-- | ksnake/board.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ksnake/board.cpp b/ksnake/board.cpp index e9e44cd0..0959dee1 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::tqparent() const { +Pos *Pos::parent() 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->tqparent(); + p = list->parent(); 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->tqparent() ? list->tqparent()->index() : lastIndex; + int pi = list->parent() ? list->parent()->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 tqparent and price of p. + // place, so let's change the parent and price of p. p->setPrice(list->price() + 1); p->setParent(list); list->addList(p); |