Logo Search packages:      
Sourcecode: vdr-plugin-spider version File versions

void Heap::moveTo ( Heap other,
int  countToMove 
) [inherited]

Move some matching cards to an other heap

Definition at line 68 of file heap.c.

References Heap::add(), Heap::card(), and Heap::count().

Referenced by FinalMove::execute(), NormalMove::execute(), FinalMove::takeBack(), and NormalMove::takeBack().

{
  for (int i = count() - countToMove; i < count(); ++i)
    other->add(card(i));
  for (int i = 0; i < countToMove; ++i)
    remove();
}


Generated by  Doxygen 1.6.0   Back to index